Fix for WARNING REMOTE HOST IDENTIFICATION HAS CHANGED!
In this short article we will go over the fix for this warning message "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"
Here is the output for this type of warning:
Why do you get this error ?
This is common when you change the name of your server or like in my case when you recover a server from a faliure and give it the same ip address as in the past.
What is the fix for this warning ?
The fix is quite simple. You just need to remove the line from you ../known_hosts file that points to the ip/host you are trying to connect to.
1 - You can do by editing your known_hosts using and editor.
2 - Use ssh-keygen command with the -R option.
the -R option will require the host name or the ip address as input and it will remove the specific line from your ../known_hosts.
Next you just need to login again and the new key will be added to the ../known_hosts file.
And we are done !