ssh reports no matching key exchange method

article #1391, updated 1330 days ago

This occurs when there is a version mismatch between the client and server of SSH. When it occurs, the client will give the list of available methods provided by the server, e.g.:

$ ssh root@1.2.3.4
Unable to negotiate with 1.2.3.4 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

You’ll have to choose one. Here’s how:

ssh -oKexAlgorithms=diffie-hellman-group14-sha1 root@1.2.3.4

Categories: