Page 1 of 1

no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffi

Posted: Sat Dec 14, 2024 11:49 am
by zemerdon
ssh into a switch - no matching key exchange method found

sudo nano /etc/ssh/ssh_config

[Enter Password]

Locate the line ‘ # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc’ and remove the Hash/Pound sign from the beginning.

Then paste the following on the end; (bottom of the file) then save and try again.

HostkeyAlgorithms ssh-rsa,ssh-dss,ssh-ed25519
KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
PubkeyAcceptedKeyTypes ssh-rsa,ssh-dss