美文网首页
解决ubuntu 20.04 Unable to negotia

解决ubuntu 20.04 Unable to negotia

作者: 娄德晶 | 来源:发表于2021-05-06 11:07 被阅读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

相关文章

网友评论

      本文标题:解决ubuntu 20.04 Unable to negotia

      本文链接:https://www.haomeiwen.com/subject/ymnrdltx.html