长风破浪会有时,直挂云帆济沧海

完美一切 一切完美 止于至善

Ubuntu - ssh 登录服务器出现错误 Host key verification failed.

在 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)
阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/oJiMoDeYe12345/article/details/80347662
个人分类: 操作系统
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

Ubuntu - ssh 登录服务器出现错误 Host key verification failed.

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭