How to fix SSH connection error: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

After reinstalling Linux OS on a virtual or dedicated server and reconnecting to server again via SSH, you may encounter an error warning. This guide explains how to get rid of the warning and reconnect to our server.

How to solve this error

To solve the error, you must go to the file indicated in the error and delete the line with the old encryption key. In our case, this is line 198.

Using Notepad, we are going to edit the file. Delete the problem line and save the file.
Be careful not to delete part of the other server’s key – if you’ve connected elsewhere.

Now we can easily enter our server without any errors.

We accept “fingerprints” by writing “yes”, and with this action we add a new key.