Can't get my rsync to work (rsa) it works interactively but not in cron


#1

This interactively works fine but in a cron it fails with
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.0]

From PRICACC cron.
/usr/bin/rsync -a NOPRIVE@somesite.com:ftpsite /home/PRIVACC/somesite.com/

I need to copy pictures from this no privileged account which is associated but I have to protect them against themselves so they don’t fling the privileged account password over the wire.

any clues?
I put it in a file and with the file file path in and it’s also fails with file not found, wth?


#2

You could probably turn off host key checking with the option: -o StrictHostKeyChecking=no

From SO answer: https://askubuntu.com/a/323629


#3

That’s SSH how do I get the rsync in there?
I guess I could try a scp -r

We will see in about 10 minutes, it’s unfortunate I can’t get the rsync but maybe they will supply a better answer.


#4

Ah, sorry, it looks like one needs to pass the ssh args via the rsync -e option. Something like:

rsync -a -e 'ssh -o StrictHostKeyChecking=no' NOPRIVE@somesite.com:ftpsite /home/PRIVACC/somesite.com/

#5

HEY…

Thanks for answering I’m going to try that.
The scp even gets and error but I don’t think it’s mine :wink:

sh: line 1: psite.com/: No such file or directory


#6

Working like a dream :wink:

Thank you VERY much, I should remember this stuff I’m just old…


#7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.