尝试SSH到我控制的计算机中,我得到了熟悉的消息:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
[...].
Please contact your system administrator.
Add correct host key in /home/sward/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/sward/.ssh/known_hosts:86
RSA host key for [...] has changed and you have requested strict checking.
Host key verification failed.
我确实确实更改过密钥。我读了几则帖子说,解决此问题的方法是从known_hosts
文件中删除旧密钥。
但是我想让ssh接受旧密钥和新密钥。错误消息中的语言(“ Add correct host key
”)表示应该有某种方法可以添加正确的主机密钥而不删除旧的主机密钥。
我无法弄清楚如何在不删除旧主机密钥的情况下添加新主机密钥。
这是否可能,或者错误消息是否极具误导性?