I have my DNS search path set to .intranet, ie, /etc/resolv.conf contains:search intranetWhen I SSH to a host using a FQDN, like mailserver.intranet, it adds an entry for mailserver.intranet to ~/.ssh/known_hosts. If I later SSH to this same host but using the simple mailserver name, SSH adds another entry to known_hosts for mailserver.Is it possible to make SSH always use FQDN in known_hosts to avoid this duplicity?
Avoiding duplicate entries in ~/.ssh/known_hosts
ssh;openssh
You could use aliases for host keys:Host <hostname>*    hostname    <fqdn>    HostKeyAlias    <alias>Your key will be saved to known_hosts as alias instead of hostname either short or long, the downside is you have to write an entry for each one of your hosts.Please note the '*' after the hostname at the first line, it's needed for matching both the short and long hostname.