~/.ssh/id_rsa.pub
我使用密钥进行有效的身份验证。因此,我在服务器中拥有客户端,~/.ssh/authorized_keys
我想知道我应该更改哪些文件才能获得以下消息?
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
51:82:00:1c:7e:6f:ac:ac:de:f1:53:08:1c:7d:55:68.
Please contact your system administrator.
Add correct host key in /Users/isaacalves/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/isaacalves/.ssh/known_hosts:12
RSA host key for 104.131.16.158 has changed and you have requested strict checking.
Host key verification failed.
我在这里找到了一种可能的方法这里:
- 删除旧的 ssh 主机密钥:
rm /etc/ssh/ssh_host_*
- 重新配置 OpenSSH 服务器:
dpkg-reconfigure openssh-server
- 不更新所有 ssh 客户端
~/.ssh/known_hosts
文件
还有其他方法吗?
PS:这有助于我更好地理解 SSH