遇到以下情况是怎么导致的,该如何解决。
root@test-desktop:~# ssh admin@100.22.36.133
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
be:f5:25:75:ce:05:64:1c:23:7e:9a:42:87:56:b1:d1.
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:19
remove with: ssh-keygen -f "/root/.ssh/known_hosts" -R 100.22.36.133
RSA host key for 100.22.36.133 has changed and you have requested strict checking.
Host key verification failed.
root@test-desktop:~#
导致这个问题的原因是,对应IP地址的sshd服务器可能重新对RSA Key进行了初始化,导致了改变。或者这个ip地址没有变,但所使用的机器可能改变了。
这样就会导致远程机器与本地的文件缓存对应不起来。
要解决这个问题,只要参考,提示中的说明即可:
ssh-keygen -f "/root/.ssh/known_hosts" -R 100.22.36.133
root@test-desktop:~# ssh-keygen -f "/root/.ssh/known_hosts" -R 100.22.36.133
# Host 100.22.36.133 found: line 19 type RSA
/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old
root@test-desktop:~#
当然也可以采用一个极端的操作,将所有缓存的数据都删除。
rm /root/.ssh/known_hosts
Tags:
ssh
ssh