Howto properly remove a host key from the ~/.ssh/known_hosts file
Posted by Taoufix on Dec 14th, 2007 in Computers
Whenever I want to do that, it’s always the same scenario:
- open the ~/.ssh/known_hosts file w/ an editor
- go to the line containing the host key
- remove it
- save
I just found the proper way to do it:
[shell]$ ssh-keygen -R remotehost
/home/kakashi/.ssh/known_hosts updated.
Original contents retained as /home/kakashi/.ssh/known_hosts.old[/shell]







Dec 14th