码迷,mamicode.com
首页 > 其他好文 > 详细

SSH登录报错REMOTE HOST IDENTIFICATION HAS CHANGED!

时间:2015-08-10 00:24:48      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:ssh   ssh-config   ssh-keygen   known-host   

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)

版权声明:本文为博主原创文章,未经博主允许不得转载。

SSH登录报错REMOTE HOST IDENTIFICATION HAS CHANGED!

标签:ssh   ssh-config   ssh-keygen   known-host   

原文地址:http://blog.csdn.net/kmust20093211/article/details/47381717

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!