I try to find a script to decrypt (unhash) the ssh hostnames in the known_hosts file by passing a list of the hostnamses.
So, to do exactly the reverse of:
ssh-keygen -H -f known_hosts
Or also, to do the same as this if the ssh config HashKnownHosts is set to No:
ssh-keygen -R know-host.com -f known_hosts ssh-keyscan -H know-host.com >> known_hosts
But without re-downloading the host key (caused by ssh-keyscan).
ssh-keygen --decrypt -f known_hosts --hostnames hostnames.txt
Where hostnames.txt contains a list of hostnames.