How can I write a program (script) to remove obsolete host keys from ~/.ssh/known_hosts?
问题 I use a cluster of about 30 machines that have all recently been reconfigured with new OpenSSH host keys. When I try to log into one, I get this error message (many lines removed for brevity): @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ The fingerprint for the RSA key sent by the remote host is 52:bb:71:83:7e:d0:e2:66:92:0e:10:78:cf:a6:41:49. Add correct host key in /home/nr/.ssh/known_hosts to get rid of this message. Offending key in /home/nr/.ssh/known_hosts:50 I can go remove the