Add correct host key in /home/tides/.ssh/known_hosts to get rid of this message
栏目:
Linux
发布时间:2022-01-27
ssh 连接 服务器时报错“Add correct host key in /home/tides/.ssh/known_hosts to get rid of this message”,详细报错信息如下:
$ ssh tides
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-119-generic x86_64)
* Documentation: https://help.ubuntu.com/
New release '16.04.7 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Welcome to Alibaba Cloud Elastic Compute Service !
Last login: Wed Jan 26 15:11:48 2022 from x.x.x.x
tides@app-401:~$ ssh saas-dev
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
cc:1c:ba:9a:95:c7:35:51:79:c6:26:29:5e:19:64:50.
Please contact your system administrator.
Add correct host key in /home/tides/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/tides/.ssh/known_hosts:9
remove with: ssh-keygen -f "/home/tides/.ssh/known_hosts" -R saas-dev
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Last login: Wed Jan 26 15:11:51 2022 from x.x.x.x
Welcome to Alibaba Cloud Elastic Compute Service !
解决方法:
方法1:删除 known_hosts 文件
rm /home/tides/.ssh/known_hosts
方法2:按报错提示操作
sudo ssh-keygen -f "/home/tides/.ssh/known_hosts" -R saas-dev
以上就是 “Add correct host key in /home/tides/.ssh/known_hosts to get rid of this message” 报错的解决方法。
本文地址:https://www.tides.cn/p_linux-add-correct-host-key-in-ssh-known_hosts-to-get-rid-of-this-message