HOSTKEYCHECK

Synopsis

HELP:   Host key verification mode or host key fingerprint [STRICT]
TYPE:   STRING
SYNTAX: HOSTKEYCHECK='str'/STRICT/ASK/WARN/ACCEPTANY

Description

When an SSH client connects to an SSH server, the server identifies itself by sending its public key. It is an essential part of the security of SSH that the client must validate the server's public key to make sure that it belongs to the intended (trusted) host and not to an eavesdropper / man-in-the-middle.

The file in <HOME>/.ssh/known_hosts is used to store combinations of trusted hosts and their public keys. Entries to this file can be added manually or can be added when establishing a connection for the first time. In any case, you should have verified the host keys you add belong to the indended party. The known hosts file format is identical and fully compatible to the known_hosts format of OpenSSH.

The HOSTKEYCHECK selection is used to specify how strict the host key sent by the server is verified to decide whether to continue connecting and whether to add the key to the known_hosts file.

Here are the available options in descending order of security:

Don't use host key check levels below ASK unless you know what you are doing. By allowing arbitrary host keys, your connections can be intercepted easily.

Selections