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

猜你喜欢

转载自www.cnblogs.com/liangliangzz/p/12901358.html