1

I'm a bit confused what the "correct" path for ssh's systemwide known_hosts file is..

the man ssh says /etc/ssh/ssh_known_hosts whereas https://www.ssh.com/ssh/host-key talks about /etc/ssh/known_hosts.

Are both locations valid? Is the difference a historic artefact? Is it distribution specific? Which file path should be used?

2

For OpenSSH, its man page is the canonical documentation. According to ssh(1) - OpenBSD manual pages, /etc/ssh/ssh_known_hosts is the official path for the “systemwide list of known host keys”. This applies to all releases of OpenSSH and is not specific to any one distribution – or OS for that matter.

SSH.COM is the website for SSH Communications Security, a commercial company set up by the original designer of the SSH protocol and writer of the first implementation. It has no direct relationship with the OpenSSH project which is maintained by a group of OpenBSD developers based on a fork of an early release of the original SSH program.

I don’t know where SSH Communications Security got /etc/ssh/known_hosts from (presumably their own or the original implementation) but as a third-party source of information, it is not relevant to users of OpenSSH. Out of interest, I checked the earliest version (rev 1.1) of the OpenSSH man page and it had historically been using yet another (slightly different) path, /etc/ssh_known_hosts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.