Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

StrictHostKeyChecking not Ignoring Fingerprint Validation

Tags:

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/

like image 216
coffeemonitor Avatar asked Dec 28 '13 16:12

coffeemonitor


People also ask

How do I ignore remote host identification has changed?

You should delete the key causing the “Warning: Remote host identification has changed” error, then save your changes. You might also want to delete the entire known_hosts file, especially if you only use SSH for one or two sites. To do this, you can run rm . ssh/known_hosts in a Terminal window.

How do I bypass host key verification?

Disable with SSH Command You can define the StrictHostKeyChecking=no command line argument to ssh command to skip the host key checking.

What does StrictHostKeyChecking no do?

The strict-host-key-checking command specifies how host keys are checked during the connection and authentication phase. By default, strict host key checking is disabled. When disabled the SSH client verifies the incoming host key against the keys in the known hosts list.


1 Answers

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.

like image 68
coffeemonitor Avatar answered Oct 29 '22 10:10

coffeemonitor