码迷,mamicode.com
首页 > 其他好文 > 详细

主机的Hostkey值改变,ssh连接失败

时间:2017-10-16 09:44:04      阅读:143      评论:0      收藏:0      [点我收藏+]

标签:ssh

mac机器

bogon:~ mac$ ssh -p **22 root@**.*********.org


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:P73YH4G4Eedj7XrvYAmAst3/qtUS5E1WL8Dm8vUzDD8.
Please contact your system administrator.
Add correct host key in /Users/mac/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/mac/.ssh/known_hosts:34
RSA host key for [**.*********.org]:**22 has changed and you have requested strict checking.
Host key verification failed.



根据提示的意思我们就可以知道在本地的known_hosts保存的主机hostkey记录改变了,该记录的主键可以是所连主机的域名,也可以是所连主机的IP地址。
我们可以进入到该文档删除对应行,也可以直接用以下的命令直接把known_host


rm -rf /Users/mac/.ssh/known_hosts


OK!


----------  招募未来大神 -----------------------

如果您有利他之心,乐于帮助他人,乐于分享
如果您遇到php问题,百度且问了其他群之后仍没得到解答

欢迎加入,PHP技术问答群,QQ群:292626152

教学相长!帮助他人,自己也会得到提升!

为了珍惜每个人的宝贵时间,请大家不要闲聊!

愿我们互相帮助,共同进步!

加入时留言暗号,php,ajax,thinkphp,yii...


主机的Hostkey值改变,ssh连接失败

标签:ssh

原文地址:http://phpervip.blog.51cto.com/11075781/1972523

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!