Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Set key exchange explcitly #17

Merged
merged 1 commit into from
Apr 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pyFG/fortios.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ def __init__(self, hostname, vdom=None, username=None, password=None, keyfile=No
self.password = password
self.keyfile = keyfile
self.timeout = timeout


# Set key exchange explcitly to address known fortinet issue
paramiko.Transport._preferred_kex = ('diffie-hellman-group14-sha1',
'diffie-hellman-group-exchange-sha1',
'diffie-hellman-group-exchange-sha256',
'diffie-hellman-group1-sha1',
)

def open(self):
"""
Opens the ssh session with the device.
Expand Down