Tuesday, August 9, 2011

[Level 2] How to skip StrictHostKeyChecking in ssh.

If you want to ignore strict host key checking, even skip saving the host key info,
you could use option UserKnownHostsFile, StrictHostKeyChecking.
Ex.
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no stanley@192.168.1.1
or modify /etc/ssh/ssh_config for global settings.
# cat /etc/ssh/ssh_config
    ...
    UserKnownHostsFile /dev/null
    StrictHostKeyChecking no
    ...

Wish this helps.
regards,
Stanley Huang