Host key verification failed解决

来源:互联网 发布:java衍生语言 编辑:程序博客网 时间:2024/05/08 13:48

原先为了自动化测试而在客户机和服务器之间进行了设置,似的每次ssh时不用输入密码,但重装服务器后,出现了以下错误:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
e3:89:e4:b5:5e:fb:33:e8:ca:d5:92:9f:ba:2d:1a:04.
Please contact your system administrator.
Add correct host key in /home/smg/.ssh/known_hosts to get rid of this message.
Offending key in /home/smg/.ssh/known_hosts:1
RSA host key for 10.38.223.250 has changed and you have requested strict checking.
Host key verification failed.

SSH 登录失败:Host key verification failed 由于公钥不一样了,所以无法登录,提示信息是 KEY 验证失败。

解决方法是: 在 /root/.ssh/known_hosts 文件里面将原来的公钥信息删除即可。
0 0