解决ubuntu 20.04 Unable to negotia

2021-05-06  本文已影响0人  娄德晶

Ubunt 20.04 SSH 到一些Host或IP时,有时会出现这个的错误

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

网上的一些解决方法是加-o选项, 但是我老是记不信这个-o后面的一长串字串,Google时找到的另外一个方法:

echo "KexAlgorithms diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1" >>/etc/ssh/ssh_config.d/weak.conf

这里可能会有权限问题,那可以自己建立一个weak.conf文件,然后把KexAlgorithms diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1写在文件里保存便可。

参考文章在此: https://ubuntuforums.org/showthread.php?t=2441553

上一篇 下一篇

猜你喜欢

热点阅读