WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! 问题解决

创建的虚拟机ssh进去时,报了这样的错误

[root@localhost ~]# ssh centos@172.18.31.104
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
c4:29:02:63:b2:31:b1:08:97:6c:36:43:e3:23:da:35.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending RSA key in /root/.ssh/known_hosts:3
RSA host key for 172.18.31.104 has changed and you have requested strict checking.
Host key verification failed.

解决方案如下:

先把.ssh/know_hosts 文件中的信息打印出来看一下,是否有关于104的 ssh-rsa信息,若有,把那一条删掉,再重新ssh登陆一下,就能进去了。

你可能感兴趣的:(操作系统)