在远程ssh登录ubuntu的时候出现如下错误:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:QoT95A2mH+9pGdLrsqvRidkZP0a+TWZg3dD6U8U/haU.
Please contact your system administrator.
Add correct host key in /c/Users/dell/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /c/Users/dell/.ssh/known_hosts:6
Host key for 10.16.78.120 has changed and you have requested strict checking.
Host key verification failed.
解决方法
在客户端使用vim打开如下文件
known_hosts
,然后将对应ip地址的信息删掉,然后重新连接即可:
vim ~/.ssh/known_hosts
将自己连接ip地址的主机信息删掉,然后重新连接即可:
可以看到,已经可以从新连接了。