1

I'm having some trouble with cron/crontabs and SSH

I need to use the command:

rsync -ravH /home/mark/Backups/ -e ssh backupact@192.168.1.133:/home/backupact/DocumentBackup

This works but asks for a password during the process.

I need to add it to a crontab so I put:

30 17 * * *     rsync -ravH /home/mark/Backups/ -e ssh backupact@192.168.1.133:/home/backupact/DocumentBackup

This doesn't work, there is no prompt for password and nothing appears. cron is running.

I remember in the good old days you could type ftp://user:pass@ipaddress is the same possible in this scenario?

  • 3
    The best way would probably be to set up key-based SSH access for user backupact@192.168.1.133, using an empty passphrase – steeldriver Nov 13 '16 at 14:20
0

Update

The reply by steeldriver above helped with the password problem.

The second problem regarding: Rsync and Crontab was solved by putting the Rsync command into a new shell script, giving the shell script execute permissions and then adding the shell script to the Crontab. For some reason adding the rsync command directly to the Crontab doesn't work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.