ssh 远程主机标识已更改 [英] ssh remote host identification has changed

查看:41
本文介绍了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 并且有 Fedora 19.我该如何解决这个警告?

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.

推荐答案

这里是最简单的解决方案

Here is the simplest solution

ssh-keygen -R <host>

例如

ssh-keygen -R 192.168.3.10

来自 ssh-keygen 手册页:

From ssh-keygen man page:

  • -R hostname 从known_hosts 文件中删除属于hostname 的所有键.此选项可用于删除散列主机(请参阅上面的 -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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆