All the other current answers are missing the UserKnownHostsFile=/dev/null
If you just want to do it once you can use:
ssh -o StrictHostKeychecking=no hostname
If you want to do it repeatedly you should add something like the following to your ~/.ssh/config
Host 192.168.0.* StrictHostKeyChecking no UserKnownHostsFile=/dev/null
To configure this on OpenSSH for Windows simply replace /dev/null
with NUL
.
Good explanation from: http://linuxcommando.blogspot.com/2008/10/how-to-disable-ssh-host-key-checking.html