linux通过ssh连接错误REMOTE HOST IDENTIFICATION HAS CHANGED!的解决方法

问题描述:在linux服务器上,通过ssh root@172.16.13.123  访问服务器报如下错误:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:bdQu22ZQrKItMwKL2K/64vfF1brkRw6jpcD0Mxg5hsA.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:2
ED25519 host key for 172.16.13.123 has changed and you have requested strict checking.
Host key verification failed.

 

原因是由于以前通过这个linux客户端访问过那台linux服务器,当服务器重装系统以后,客户端识别错误,解决方法:

进入~/.ssh/known_hosts

172.16.13.123 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBB
OwpVaWRIO0ZrASBecJPvSVqAzOWTb8HUqApwQ69AUn/ytNw5iJXsaNm5OEz9JRlxiz2JB5pwgu7WOQlgcnAPu4=

删除172.16.13.123相关rsa的信息就可以访问了

 

你可能感兴趣的:(linux,ssh)