Possible solutions for problems when connecting to legacy SSH hosts
no matching key exchange method found
When getting this error message when accessing a SSH server
$ ssh 192.168.0.78
Unable to negotiate with 192.168.0.78 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
Unable to negotiate with 192.168.0.78 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
you should add the offered key exchanges to the command line
$ ssh \
-oKexAlgorithms=+diffie-hellman-group-exchange-sha1 \
-oKexAlgorithms=+diffie-hellman-group1-sha1 \
192.168.0.78
-oKexAlgorithms=+diffie-hellman-group-exchange-sha1 \
-oKexAlgorithms=+diffie-hellman-group1-sha1 \
192.168.0.78
no matching cipher found.
When getting this error message, when accessing a SSH server
$ ssh \
-oKexAlgorithms=+diffie-hellman-group-exchange-sha1 \
-oKexAlgorithms=+diffie-hellman-group1-sha1 \
192.168.0.78
Unable to negotiate with 192.168.0.78 port 22: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
-oKexAlgorithms=+diffie-hellman-group-exchange-sha1 \
-oKexAlgorithms=+diffie-hellman-group1-sha1 \
192.168.0.78
Unable to negotiate with 192.168.0.78 port 22: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
you should add the offered ciphers. Some ciphers will not work. You need to add all of them and remove the ones that doesn't work.
$ ssh \
-oKexAlgorithms=+diffie-hellman-group-exchange-sha1 \
-oKexAlgorithms=+diffie-hellman-group1-sha1 \
-oCiphers=+aes128-cbc \
-oCiphers=+3des-cbc \
-oCiphers=+aes192-cbc \
-oCiphers=+aes256-cbc \
192.168.0.78
-oKexAlgorithms=+diffie-hellman-group-exchange-sha1 \
-oKexAlgorithms=+diffie-hellman-group1-sha1 \
-oCiphers=+aes128-cbc \
-oCiphers=+3des-cbc \
-oCiphers=+aes192-cbc \
-oCiphers=+aes256-cbc \
192.168.0.78
Comments
Post a Comment