0
点赞
收藏
分享

微信扫一扫

SSH 连接时报错:Host key verification failed.


完整报错信息:

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

解决办法:

参考:​​https://ithelp.ithome.com.tw/articles/10083004​​

Method 1 

vim /root/.ssh/known_hosts
#把有問題的 ip KEY刪掉

Method 2

rm -rf  /root/.ssh/known_hosts
# 谨慎操作

Method 3

ssh-keygen -R 2.1.2.5
# 移除有问题的即可,推荐~

举报

相关推荐

0 条评论