ssh-无法登陆,提示Unable-to-negotiate, no matching key exchange method found

报错

1
Unable to negotiate with 192.168.251.82 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

解决

方法一

1
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 123.123.123.123

方法二

编辑 ~/.ssh/config

1
2
Host 123.123.123.123
    KexAlgorithms +diffie-hellman-group1-sha1

或者,带上wildword

1
2
Host 192.168.1.*
    KexAlgorithms +diffie-hellman-group1-sha1

~~~