exp : Linux/ ssh登录失败: REMOTE HOST IDENTIFICATION HAS CHANGED
时间:2020-12-20
系统:ubuntu 18.04
$ ssh xxx@192.168.6.111
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:YrQ+gVZEbmDtg0keh6jdgpJV/nU5UO/5U/iQDTHpRcc.
Please contact your system administrator.
Add correct host key in /home/xxx/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/xxx/.ssh/known_hosts:10
remove with:
ssh-keygen -f "/home/xxx/.ssh/known_hosts" -R "192.168.6.111"
ECDSA host key for 192.168.6.111 has changed and you have requested strict checking.
Host key verification failed.
问题原因:
远程电脑重新安装了,之前保存的信息失效。
解决方案:
执行提示中的命令
ssh-keygen -f "/home/xxx/.ssh/known_hosts" -R "192.168.6.111"
参考:
REMOTE HOST IDENTIFICATION HAS CHANGED 问题解决
https://www.jianshu.com/p/04328ed5970e