Sep 23

SSH 登录失败:Host key verification failed 的解决方法 不指定

碟舞飞扬 , 11:52 , Linux技术 , 评论(0) , 引用(0) , 阅读(25380) , Via 本站原创 | |
在家搭配了一个模拟的环境,创建了几个虚拟机,今天远程连接到机器上使用内网IP连接到其他内网机器时,出现以下错误提示:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
a1:ee:9e:76:32:ab:79:83:21:c1:d1:eb:35:44:fe:b4.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:13
RSA host key for 192.168.1.6 has changed and you have requested strict checking.
Host key verification failed.
原因就是在上次登录到那台机器之后,我把那台虚拟机重新做了系统,导致Host key和之前保存的不一致,所以提示KEY 验证失败不能登录。
解决方法很简单: vi /root/.ssh/known_hosts 删除掉那个IP对应的公钥,保存退出再连接就可以了。
Tags: , , ,
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]