Skip to content

How to disable SSH host key checking

This article presents a very nice overview of options to disable ssh host key checking.  When working with embedded systems where you are constantly reloading the rootfs, it is really annoying to have to edit your ~/.ssh/known_hosts every time you update the rootfs on the target device.  The solution is to simply disable host key checking for your local subnet by adding something like the following to the beginning of /etc/ssh/ssh_config:

Host 192.168.1.*
   StrictHostKeyChecking no
   UserKnownHostsFile=/dev/null

Anything not on the 192.168.1.* subnet is still checked.

Update 2009-09-26:

Another place to put these config settings is: ~/.ssh/config