当前位置:首页 » 《我的小黑屋》 » 正文

【linux】SSH 连接失败: no matching host key type found. Their offer: ssh-rs

18 人参与  2024年04月14日 09:16  分类 : 《我的小黑屋》  评论

点击全文阅读


root:~ >ssh root@192.168.33.133Unable to negotiate with 192.168.33.133 port 22: no matching host key type found. Their offer: ssh-rsa

这个问题经常出现在ssh 服务端版本和客户端版本不匹配。

要解决问题,需要在命令加上一个选项: -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa

比如:

ssh -i key.pem shell@3.252.167.165 -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa

也可以加参数加到 ssh config file, /etc/ssh/ssh_config :

HostKeyAlgorithms = +ssh-rsaPubkeyAcceptedAlgorithms = +ssh-rsa

另一个选择是在创建密钥对时使用不同的算法。

要查看 Linux 系统上 SSH 命令支持的算法,可以使用 ssh -Q 命令。具体来说,可以使用以下命令来查看支持的加密算法、散列算法和公钥算法:

ssh -Q cipher # 查看支持的加密算法 ssh -Q mac # 查看支持的散列算法 ssh -Q key # 查看支持的公钥算法

.


点击全文阅读


本文链接:http://zhangshiyu.com/post/95071.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1