ssh远程主机标识已更改 [英] ssh remote host identification has changed
本文介绍了ssh远程主机标识已更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已重新安装服务器,并收到以下消息:
I've reinstalled my server and I am getting these messages:
[user@hostname ~]$ ssh root@pong
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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/hostname /.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.
我尝试了在Internet上找到的各种解决方案.我的known_hosts
文件(通常在~/.ssh/known_hosts
中)在/var/lib/sss/pubconf/known_hosts
中.我试图对其进行编辑,但它仍处于一种状态.我已经安装了 ipa-client ,并安装了Fedora19.如何解决此警告?
I have tried various solutions that I found on the Internet. My known_hosts
file (normally in ~/.ssh/known_hosts
) is in /var/lib/sss/pubconf/known_hosts
. I've tried to edit it, but it remains in one state. I have installed ipa-client and have Fedora 19. How do I resolve this warning?
到目前为止,所有答案都只有在没有安装Freeipa的情况下才有效.
在adrin下方的评论中,freeipa的正确答案是在此处.
The right answer for freeipa in comments below from adrin is here.
推荐答案
这是最简单的解决方案
ssh-keygen -R <host>
例如,
ssh-keygen -R 192.168.3.10
来自 ssh-keygen
手册页:
-
-R hostname
从known_hosts文件中删除所有属于主机名的密钥.此选项对于删除散列主机很有用(请参见上面的-H选项).
-R hostname
Removes all keys belonging to hostname from a known_hosts file. This option is useful to delete hashed hosts (see the -H option above).
这篇关于ssh远程主机标识已更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文