ssh 命令登陆服务器失败,Host key verificat

2016-06-04  本文已影响1643人  devzhaoyou

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 ECDSA key sent by the remote host is
SHA256:9IbjRevN82JiX9xPE/kSaXHCb4gD7eso13lBiAoGh3Y.
Please contact your system administrator.
Add correct host key in /Users/gezhaoyou/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/gezhaoyou/.ssh/known_hosts:23
ECDSA host key for 192.168.9.174 has changed and you have requested strict checking.
Host key verification failed.

解决方法:

原因是系统有改变,导致加密的密钥改变,因此本地保存的密钥失效;
错误中已经提示:Offending ECDSA key in /Users/gezhaoyou/.ssh/known_hosts:23;
删除 ~/.ssh/known_hosts 文件中指定23行,指定IP的密钥即可。

上一篇下一篇

猜你喜欢

热点阅读