[Fixed] SSH Error Host key verification failed.

Issue

Host key of the server you are trying to connect, has changed. So you get an error like this

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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

Solution

Remove the old host key for server

ssh-keygen -R <IP address or Hostname>

EXAMPLE –

ssh-keygen -R 34.45.123.56

Now you can ssh back into your server

Leave a Reply

(*) Required, Your email will not be published