In this guide, we have explained how to disable strict host key checking using the command line. The strict-host-key-checking command agrees with how host keys are checked through the connection and verification phase.

Follow the procedure:

  1. Using the StrictHostKeyChecking=no command line argument, you can skip the host key verification process.
    ssh -o StrictHostKeyChecking=no [email protected]
  2. Config file usage
    In the configuration file, you can also define strings that disable host key checking. It is necessary to create a ~/.ssh/config file and add the following content to disable strict host key checking.
    vi ~/.ssh/config
    Host *
    StrictHostKeyChecking no
  3. Host checking will be disabled for all hosts you connect with. Instead of disabling the host check for all hosts, disabling a particular host would be preferable.
    Host 192.168.1.10
    StrictHostKeyChecking no
  4. Set the file’s permissions to make it read-only for the user as well.
    sudo chmod 400 ~/.ssh/config

In this way, strict host key checking can be disabled from the command line. Please feel free to contact our support staff at any time if you have any questions.