Is it possible to remove a particular host key from known_hosts?

Posted by Kaustubh P on Ask Ubuntu See other posts from Ask Ubuntu or by Kaustubh P
Published on 2011-01-10T05:56:22Z Indexed on 2011/01/10 5:58 UTC
Read the original article Hit count: 299

Filed under:

I usually end up deleting the entire known_hosts file, which I have no problems for. But just out of curiosity, Is it possible to remove just a single entry? I opened the known_hosts file, and other han understanding that the file contains fingerprints for a given machine, I ddnt understand anything. Below is the message I faced, which led me to ask this question.

Add correct host key in /home/wissen16/.ssh/known_hosts to get rid of this message.
Offending key in /home/wissen16/.ssh/known_hosts:1
RSA host key for foo.com has changed and you have requested strict checking.
Host key verification failed.

Thanks.

© Ask Ubuntu or respective owner

Related posts about ssh