Linux / Unix: Disable OpenSSH Host Key Checking

Linux / Unix: Disable OpenSSH Host Key Checking

To disable OpenSSH host key checking in Linux or Unix, you can add the following line to your ~/.ssh/config file:

‮‬refer to:lautturi.com
StrictHostKeyChecking no

This will disable the host key checking feature, which verifies the identity of the remote host you are connecting to. Disabling host key checking can be useful in certain situations, such as when you are connecting to a remote host for the first time and do not have the host key stored in your ~/.ssh/known_hosts file.

However, it is important to note that disabling host key checking can also pose a security risk, as it allows anyone to impersonate the remote host you are connecting to. Therefore, it is generally recommended to leave host key checking enabled.

If you only want to disable host key checking for a specific host or group of hosts, you can specify the hostname or domain name in your ~/.ssh/config file like this:

Host example.com
    StrictHostKeyChecking no

This will disable host key checking only for connections to the host example.com.

Created Time:2017-10-29 22:08:58  Author:lautturi