I am unable to ssh to a server that asks for a diffie-hellman-group1-sha1
key exchange method:
ssh 123.123.123.123
Unable to negotiate with 123.123.123.123 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
How to enable the diffie-hellman-group1-sha1
key exchange method on Debian 8.0?
I have tried (as proposed here) to
add the following lines to my
/etc/ssh/ssh_config
KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr
regenerate keys with
ssh-keygen -A
restart ssh with
service ssh restart
but still get the error.
Unable to negotiate with 192.168.1.1 port 22: no matching key exchange method found. Their offer: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,kexguess2@matt.ucc.asn.au
so I added the first offer into config and it worked