红联Linux门户
Linux帮助

SSH登录报错REMOTE HOST IDENTIFICATION HAS CHANGED!

发布时间:2015-08-10 09:42:46来源:linux网站作者:kmust20093211

ssh登录远程主机报错:

[XX@XX ~]$ ssh monitor@xxx.xxx.xxx.xxx
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
6e:45:f9:a8:af:38:3d:a1:a5:c7:76:1d:02:f8:77:00.
Please contact your system administrator.
Add correct host key in /home/XX/.ssh/known_hosts to get rid of this message.
Offending RSA key in /var/lib/sss/pubconf/known_hosts:4
RSA host key for pong has changed and you have requested strict checking.
Host key verification failed.


突然理解了,目标机刚装了新系统fedora 22,它的ssh_key是新的。重装之前登录的时候ssh_key被存储在本机的know_hosts里面。所以现在重装完系统再登录2个key就冲突了,报出上面这个错误。


解决办法有2个:

1.删除本机存储的旧的ssh_key

vi ~/.ssh/known_hosts

2.更新本机的known_hosts

ssh-keygen -R hostname(IP)


如何在Linux上用一次性密码确保SSH登录安全?:http://www.linuxdiyf.com/linux/10991.html

使用SecureCRT或者Putty通过ssh登录Linux主机很慢:http://www.linuxdiyf.com/linux/8179.html

SUSE非正常重启导致无法SSH登录:http://www.linuxdiyf.com/linux/5728.html