Is it possible to remove an ssh key from known_hosts
both for the IP and for the FQDN of a machine, knowing only one of the 2?
For example, I am on machine A, and I want to remove the public ssh key of machine B (whose IP is 1.2.3.4) from A's known_hosts
.
If I just do ssh-keygen -R 1.2.3.4
, I will remove the ssh key for IP 1.2.3.4 from known_hosts
. But if known_hosts
also has the ssh key for B's FQDN (say, it's my.machine.b.com
), then that one won't disappear (without me having to ssh-keygen -R my.machine.b.com
).
Is it possible to purge known_hosts
from anything regarding machine B completely, just by knowing B's IP or B's FQDN?