SSH: Host Identification Has Changed

Host Identification Has Changed KB ID 0001889

Problem

I’ve been doing a lot of building and destroying Linux boxes lately, and came across this problem, (while attempting to SSH into one).

Host Identification Has Changed

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 RSA key sent by the remote host is
SHA256: xxxxxxxxxxxxxxxxx
Please contact your system administrator.
Add correct host key in /Users/sysadm/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/sysadm/.ssh/known_hosts:20
RSA host key for xxxxxxxxxxx has changed and you have requested strict checking.
Host key verification failed.

Solution: Host Identification Has Changed

So essentially, there’s a record kept of all the ssh keys presented, along with their associated hosts, your PC is warning you that the key now being presented is simply different from the one that was presented last time it connected.

You can see (above) the command I used to remove the ‘cached’ key so I could proceed.

ssh-keygen -R {host}

In my case the host is simply the IP address 192.168.100.103, yours may be the hostname or FQDN (to which you were attempting to connect)

Once purged, try to connect again and you should be prompted to accept and save the new presented SSH key.

Related Articles, References, Credits, or External Links

NA

Author: PeteLong

Share This Post On

Submit a Comment

Your email address will not be published. Required fields are marked *