Skip to content

Instantly share code, notes, and snippets.

@rdapaz
Created September 26, 2023 04:01
Show Gist options
  • Save rdapaz/015a4a3f95e51a12b1871091f8fd5305 to your computer and use it in GitHub Desktop.
Save rdapaz/015a4a3f95e51a12b1871091f8fd5305 to your computer and use it in GitHub Desktop.
Negotiate SSH

When attempting to SSH to a cisco switch from a raspbian device (raspberry pi), getting the following error:

unable to negotiate with 192.168.1.7 port 22: no matching key exchange method found. 
Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

Resolve by issuing ssh as follows:

ssh -o KexAlgorithms=+diffie-helman-group1-sha1 user@ip_address

Alternatively, edit the ssh client configuration file to include this entry (.ssh/config) on user's home directory:

Host <ip_address> KexAlgorithms +diffie-hellman-group1-sha1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment