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.
Open your SSH configuration file, which is typically located at
~/.ssh/config. If the file does not exist, you can create it.
|$ vi |
Add the following lines to the file:
|Host * |
*with the hostname(s) you want to apply it.
Save the file and exit.
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