ssh远程报Please contact your system administrator.

2021-08-12

远程服务器报错:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:uwe1uupR9FI44dj5FuNovQ0C3FSw/qZ7zA0r3EiK1oc.
Please contact your system administrator.
Add correct host key in C:\\Users\\user/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:\\Users\\user/.ssh/known_hosts:4
ECDSA host key for 49.233.3.126 has changed and you have requested strict checking.
Host key verification failed.

image.png

场景重现:

我之前一直远程一台服务器,结果今天报服务器重置了,重置结束后改了密码,结果在windows上登录出现了以上错误

问题:

根据上面的大概意思就是在你本地电脑上的known_hosts文件中已经存在一个key,它和服务器返回的不一致

image.png

解决办法:

根据他的提示找到对应文件C:\Users\user/.ssh/known_hosts

接下来打开文件,将对应IP那一行数据删除,保存

重新登录,成功

image.png


标题:ssh远程报Please contact your system administrator.
作者:sirwsl
地址:https://www.wslhome.top/articles/2021/08/12/1628738328056.html