I am trying to set up a cron to run this command:
rsync -e "ssh -i /home/ldsmp3/ssh-key -o GSSAPIAuthentication=no" -az /home/ldsmp3/public_html [email protected]:remote-dir%%bak-ldsmp3.com%%myid%%mykey
When I run the above command in terminal, it works just fine. However, when I run that same command through cron, it fails and sends me an email that contains the following...
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(463) [sender=2.6.8]
I've been searching online for hours now trying to figure out how to fix the problem, but nothing I've tried so far has worked.
Any ideas on how to get this command to work properly through cron?
Thanks!
EDIT: Oh and I'm trying to run this command on my dedicated server running Centos 5.5