How to disable the SSH host key check?
This article has last been updated at .
How to disable the SSH check of host authenticity and the key fingerprint?
Define the StrictHostKeyChecking option and set it to 'no' when connecting.
ssh -o StrictHostKeyChecking=no user@hostnameThe ssh command can be instructed to ignore incorrect host keys with the -o StrictHostKeyChecking=no option. This sets the option StrictHostKeyChecking to ignore changed host keys.
This setting can also be configured in /etc/ssh_config to define it as its default. An alternative is to define it per host, in the file in your home directory ~/.ssh/config .
Command line usage
To use this option on the command line, specify the setting and set it to no.
ssh -o StrictHostKeyChecking=no user@hostname
Possible security impact
Disabling this check may increase the risk of a MitM attack. When possible, try to confirm why the host key changed. When using a hostname, confirm first that the name resolution is correct.