ssh连接的时候出现Host key verification failed

Posted liangliangzz

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 RSA key sent by the remote host is
SHA256:97IKwQPJ0O/BXrie2gBo9QojZCfXNwekaR6zPMa8pPw.
Please contact your system administrator.
Add correct host key in /Users/liangshu/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/liangshu/.ssh/known_hosts:3
RSA host key for [127.0.0.1]:8022 has changed and you have requested strict checking.
Host key verification failed.

解决方法:

在正在操作的机器上执行

vi ~/.ssh/known_hosts

进入此目录,删除

127.0.0.1.*.* 相关的rsa信息即可

或者删除这个文件

cd ~/.ssh/

rm known_hosts

 

以上是关于ssh连接的时候出现Host key verification failed的主要内容,如果未能解决你的问题,请参考以下文章

ssh连接的时候出现Host key verification failed

SSH Host key verification failed 以及ssh密钥登陆

SSH Host key verification failed 以及ssh密钥登陆

ssh远程的时候出现Read from socket failed: Connection reset by peer

ssh登录出现 Host key verification failed. 问题

解决ssh-copy-id时Host key verification failed的错误