本来准备在思科模拟器上SSH一台思科交换机进行实验的,结果出现了“diffie-hellman-group1-sha1”问题,百度参考了一下各种文章,最终找到解决思路。

现象:

当直接SSH连接时会出现

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

 解决方案是:

在原有基础上添加"-oHostKeyAlgorithms=+ssh-dss -oKexAlgorithms=+diffie-hellman-group1-sha1" 参数进行连接

ssh -oHostKeyAlgorithms=+ssh-dss -oKexAlgorithms=+diffie-hellman-group1-sha1 test@172.16.89.13

Logo

Agent 垂直技术社区,欢迎活跃、内容共建。

更多推荐