WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! 无法远程访问的

本地主机版本:Ubuntu 18.04.5 LTS
远程主机版本:CentOS 8.0

问题:通过本地主机Terminal终端进行远程连接登录的时候出现以下问题

syf@syf-linux:~$ ssh root@118..62.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:z3S/cfxaZxM1j3ENBSYutxwDbXG77tyo1eWjCRN277c.
Please contact your system administrator.
Add correct host key in /home/syf/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/syf/.ssh/known_hosts:1
remove with:
ssh-keygen -f "/home/syf/.ssh/known_hosts" -R "118..62."
ECDSA host key for 118..62. has changed and you have requested strict checking.
Host key verification failed.

解决方案:
使用【ssh-keygen -R "你的远程服务器ip地址"】此命令,即可解决,目的是清除你当前机器里关于你的远程服务器的缓存和公钥信息,注意是大写的字母“R”。

syf@syf-linux:~$ ssh-keygen -R "118..62."

Host 118..62. found: line 1

/home/syf/.ssh/known_hosts updated.
Original contents retained as /home/syf/.ssh/known_hosts.old

参考文章:https://blog.csdn.net/qq_31747765/article/details/82414278

posted @ 2020-09-25 12:53  大家都叫我会长  阅读(109)  评论(0)    收藏  举报