美文网首页
Unable to negotiate with xxx: no

Unable to negotiate with xxx: no

作者: 大老三 | 来源:发表于2017-11-15 21:13 被阅读177次

在CentOS7上在用ansible部署OpenStack AIO环境时,遇到以下报错:

fatal: [aio1]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Unable to negotiate with 172.29.236.100 port 22: no matching MAC found. Their offer: hmac-sha2-256,hmac-sha2-512\r\n", "unreachable": true}

尝试在该服务器上SSH 127.0.0.1,报错如下:
1Unable to negotiate with 127.0.0.1 port 22: no matching MAC found. Their offer: hmac-sha2-256,hmac-sha2-512

但在我的macbook上,去SSH这个服务器是正常的。
于是通过ssh -vvv 看了下 debug信息,发现macbook上有部分信息与该服务器上执行ssh -vvv是不一样的:

macbook ssh服务器:
debug2: MACs ctos: hmac-sha2-256,hmac-sha2-512
debug2: MACs stoc: hmac-sha2-256,hmac-sha2-512

服务器ssh本地:
debug2: MACs ctos: hmac-sha1
debug2: MACs stoc: hmac-sha1

于是查看服务器上的ssh配置,在/etc/ssh/ssh_config上发现:
MACs hmac-sha1

没有hmac-sha2-256等信息,将这一行修改为:
MACs hmac-sha1, hmac-sha2-256, hmac-sha2-512

问题解决。

相关文章

网友评论

      本文标题:Unable to negotiate with xxx: no

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