[报错]ssh错误

问:

 

尝试通过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
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密钥,因此获取上述消息是正常的。

只需编辑〜/ .ssh / known_hosts并删除第12行,就像消息指出的那样

Offending RSA key in /Users/isaacalves/.ssh/known_hosts:12

或使用ssh-keygen删除无效密钥

ssh-keygen -R "这里换成你的ip地址"


原地址:https://www.digitalocean.com/community/questions/warning-remote-host-identification-has-changed

posted @ 2018-04-07 09:20  -Oreo  阅读(302)  评论(0编辑  收藏  举报