September 2, 2007 Leave a comment
This is the correct way to remove old public keys from your known_hosts file.
There are times when public keys change for legitimate reasons. Like when you get a new operating system installed or something.
In the past, I’ve just edited .ssh/known_hosts and deleted the entries (there is normally at least two, one for the IP and one for the host name). This can be a bit hard because these entries aren’t really labeled clearly.
A better way is to:
ssh -R hostname
ssh -R IP