在 Ubuntu 终端采用 SSH 连接服务器时,ssh ubuntu@xxx.xxx.xxx.xxx
,出现类似于下面的错误:
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
e3:67:c8:86:49:5e:f1:65:68:30:33:28:6d:bb:8b:2e.
Please contact your system administrator.
Add correct host key in /home/hgf/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/aihgf/.ssh/known_hosts:8
remove with: ssh-keygen -f "/home/hgf/.ssh/known_hosts" -R xxx.xxx.xxx.xxx
ECDSA host key for xxx.xxx.xxx.xxx has changed and you have requested strict checking.
Host key verification failed.
解决方案:
- 方案 1:
sudo rm -rf ~/.ssh/known_hosts # 删除已有known_hosts 文件
- 方案 2:
ssh-keygen -R xxx.xxx.xxx.xxx(服务器ip)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。