Sometimes you want to automate some SSH command execution and don't really care about checking the remote machines in

~/.ssh/known_hosts

Warning: do this only if you really understand the consequences! I.e. it is very silly to ignore known_hosts on any machines across the Internet. It makes some sense on your intranet, where servers are rebuilt frequently and where external access is restricted; or where the user, executing the script, doesn't have write permissions for its own home directory, so no known_hosts file can be created. And even then think long and hard before using this trick:

ssh -q -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"

It will, in effect, skip checking known_hosts altogether. Once again, BEWARE - do this at your own risk and don't even think about blaming me for any negative consequences! :)

Tags: computers
Categories: None |

1 comment has been posted.

    July 5, 2014, 8:28 a.m. - Dyan Joy  
    Thanks
    Reply
Your email: we will send you a confirmation link to this address to confirm your identity and to prevent robot posting
Get in touch
»...«
Follow updates

Join our social networks and RSS feed to keep up to date with latest news and publications