StrictHostKeyChecking not Ignoring Fingerprint Validation

coffeemonitor picture coffeemonitor · Dec 28, 2013 · Viewed 27.9k times · Source

I'm Rsync-ing with the following command:

# rsync -arvce ssh /tmp/rsync/file.txt user@domain:/tmp/rsync/

This works fine, and I will have to do this for multiple places, so I want to implement the StrictHostKeyChecking option.

After reading other online examples I've added the option like this (3 examples):

# rsync -arvce ssh -o 'StrictHostKeychecking no' /tmp/rsync/file.txt user@domain:/tmp/rsync/

# rsync -arvce ssh -o 'StrictHostKeychecking=no' /tmp/rsync/file.txt user@domain:/tmp/rsync/

# rsync -arvce ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/rsync/file.txt user@domain:/tmp/rsync/

I still get prompted to validate the target server's key. I understand the -o StrictHostKeychecking=no options let me choose whether to bypass that step each time I open a connection.

Am I doing it incorrectly?

here' some links I've read about this:

http://linuxcommando.blogspot.com/2008/10/how-to-disable-ssh-host-key-checking.html

http://www.thegeekstuff.com/2010/04/how-to-fix-offending-key-in-sshknown_hosts-file/

http://www.cyberciti.biz/faq/linux-appleosx-howto-disable-ssh-host-key-checking/

Answer

coffeemonitor picture coffeemonitor · Dec 28, 2013

I've resolved it.

Here's the correct (or mostly correct) way to add that option:

# rsync -e "ssh -o StrictHostKeyChecking=no" -arvc /tmp/rsync/file.txt user@domain:/tmp/rsync/

Appears there's a finicky way to apply the option, by adding double quotes and placing the ssh inside.