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.
Similar Article  How to connect to an EC2 instance with non ec2-user


Next you just need to login again and the new key will be added to the ../known_hosts file.


And we are done !


I hope this was helpful and i appreciate if you would like, subscribe or share our posts. I it is just a click


No Comments
Leave a Comment

%d bloggers like this: