Introduction:

SSH (Secure Shell) is a popular network protocol used for secure remote access to servers and other network devices. When connecting to an SSH server for the first time, the client will check the host key of the server to verify its identity. This process is known as strict host key checking. However, there may be situations where you want to disable strict host key checking, such as when connecting to a new server or when the server’s host key has changed. In this article, we will discuss how to disable strict host key checking in SSH.

Prerequisites:

Server credentials.

Procedure:

Step1:

Open your SSH configuration file, which is typically located at ~/.ssh/config. If the file does not exist, you can create it.

$ vi ~/.ssh/config

Step2:

Add the following lines to the file:

Host *
StrictHostKeyChecking no
This will apply the setting to all hosts you connect to. If you only want to apply it to specific hosts, replace the * with the hostname(s) you want to apply it.

Step3:

Save the file and exit.

Conclusion:

Disabling strict host key checking in SSH can be useful in certain situations, such as when connecting to a new server or when the server’s host key has changed. However, it also introduces security risks as it allows connections to untrusted hosts without proper authentication

Leave a Reply