Rsync permission denied using cron server to server over internet
I am able to get rsync working, from directory to directory on local computer,
and its even working from server to server if i input the command manually(it asks me for my password) But using a cron over the internet from server to server, i am getting a permission denied from the cron, in the mail I noticed when i make a cron and it runs at it's scheduled time, it doesn't ask me for a password and even if it did, i wouldn't be around when the cron runs. is there a way i can put -pmypassword somewhere in my cron? This is the command i am using in the cron: rsync -av --delete -e ssh /mywebsitefiles/ root@89.123.123.123:/backup_of_mywebsitefiles/ where exactly do i put the password inside that cron commanad thanks! |
at first you gave no exact information, so we can only guess. Probably you only mistyped something, or ????
But putting a password (of root) into crontab is not a good idea at all. You ought to configure passwordless login, use different account. Probably the password contains something strange which may cause a syntax error. I would try to write a shell script which can be invoked from a terminal and also works from crontab too. Cron has no terminal and is not able to ask for any password. |
Quote:
Code:
rsync -av --delete -e 'ssh -i /home/chripy/.ssh/some_key_rsa' chripy@203.0.113.123:/backup_of_mywebsitefiles/ |
All times are GMT -5. The time now is 02:01 AM. |