报错解决 REMOTE HOST IDENTIFICATION HAS CHANGED

REMOTE HOST IDENTIFICATION HAS CHANGED

报错

$ ssh root@114.121.43.3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ED25519 key sent by the remote host is
SHA256:V6Yv22sNitZoKCoTDCjiT+i7J8v254fj5MLZyi4GtMA.
Please contact your system administrator.
Add correct host key in /Users/ss/.ssh/known_hosts to get rid of this message.
Offending ED25519 key in /Users/ss/.ssh/known_hosts:24
Host key for 114.121.43.3 has changed and you have requested strict checking.
Host key verification failed.

解决

需要把缓存的 hosts 删除就好了

cd $HOME/.ssh/

进入到.ssh目录,删除掉known_hosts文件中包含要连接的服务器IP行即可:

sed -i '/114.121.43.3/d' $HOME/.ssh/known_hosts

说明

请关注 危 ❤ 工中号【进击云原生】,更有 free 资源供您学习

本文由mdnice多平台发布

posted @ 2022-11-21 10:55  进击云原生  阅读(245)  评论(0编辑  收藏  举报