Solution for password free key logon failure due to reinstallation of linux system

  • 2020-05-12 06:42:55
  • OfStack

Appears on one linux machine, ssh remote, and one linux server:

[root@server .ssh]# ssh 192.0.50.80
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
97:d3:d4:f1:c9:c6:2e:40:93:b2:a8:70:45:e8:d2:6c.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:1
RSA host key for 192.0.50.80 has changed and you have requested strict checking.
Host key verification failed.
[root@server .ssh]#

This is because the ssh on the ssh machine has to be reinstalled or the system has been reinstalled, resulting in the failure of RSA host key. The solution: mv /root/.ssh /known_hosts /tmp can be logged in again


Related articles: