SSH Issue with Cisco Switch

0 Comment

So Today i wanted to login to my old Cisco Switch 2960 from my Suse Linux when i received the following error:

ERROR:
Unable to negotiate with 10.1.1.1 port 22: no matching key exchange method found. Their offer: diffie-helman-group1-sha1
Note**: 10.1.1.1 is ip of my switch with username salman

SOLUTION:
1) Make sure you configure ssh keys with 1024 bits when setting it up in the switch
2) From your Linux machine issue the following command:

# ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 salman@10.1.1.1

Tip**: For Debugging SSH,  use ssh -vvv option.

Update:

If you receive such error:
no matching cipher found. Their offer: aes128-cbc,3des-cbc,aes192 cbc,aes256-cbc

Open /etc/ssh/ssh_config and un comment the following:

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc

Now try and it should work !.

Thanks for Reading

Join our FB Linux Group LZH
https://www.facebook.com/groups/LZHProject
Subscribe to our YouTube Channel
https://youtube.com/linuxking

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.