WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED

时间:2019-08-20 17:58:32  来源:igfitidea点击:

使用ssh远程登录时,提示:

root@theitroad:/tmp# ssh 10.10.0.16
<<<<<<<<<<<<<<<<<<<@@
@    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
13:f2:a2:87:ff:79:e5:92:79:b4:10:51:53:c2:fb:60.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:11
  remove with: ssh-keygen -f "/root/.ssh/known_hosts" -R 10.10.0.16
RSA host key for 10.10.0.16 has changed and you have requested strict checking.
Host key verification failed.
root@theitroad:/tmp#

原因

因为系统中保存的指纹信息与服务器上的指纹值不匹配。
一般是主机IP修改了。新IP和本地记录的另一台服务器的IP相同。

解决方法

根据提示, 删除旧指纹即可。

remove with: ssh-keygen -f "/root/.ssh/known_hosts" -R 10.10.0.16

vi +11 ~/.ssh/known_hosts

d键两次可以删除整行。保存即可。

dd
:wq