-- 创造无限可能

ssh问题:Host key verification failed.

2022-10-30 20:47:52
557 人浏览 1 人点赞
有用,点赞支持一下

问题复现

使用ssh链接服务器

ssh root@ip地址

报以下错误


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:xxxxxxxxxxxxxxxxxxxxxxxxxxx.
Please contact your system administrator.
Add correct host key in /Users/xxx/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/xxx/.ssh/known_hosts:46
ECDSA host key for ip地址 has changed and you have requested strict checking.
Host key verification failed.

问题原因

重置过服务器后,再次想访问会出现这个问题。

问题解决

ssh-keygen -R IP地址