Twitter (not set)
Blog (not set)
Website (not set)


Remove offending key from known_hosts file with one swift move

 $ ssh-keygen -R <hostname>

— by openiduser126 on Jan. 25, 2014, 1:35 p.m.


The ssh-keygen tool comes with an option for this already, there is no need for esoteric one-liners that are hard to remember.

Say you ssh and its host key has changed because you just reinstalled it. Run ssh-keygen -R then try to connect to the server again, you'll be presented with the option to save the host key just like new.