Hi,
I'm trying to backup from one machine to the other (automatically via cron) using rsync and ssh password-less public key authentication.
I having been trying to set this up following an article in a Linux magazine[1] by only allowing the specific rsync command to run on the remote box.
I am using the following rsync command:
$ rsync -avz -e "ssh -i ~/.ssh/backup-key" /backup stewart@name.of.remote.server:/backup
This runs, connects using keys asking for no password and completes successfully until I add the above command to my authorized_keys file on the remote box:
command="rsync -avz -e "ssh -i ~/.ssh/backup-key" /backup stewart@name.of.remote.server:/backup" ssh-dss ... key ...
The client then says it cannot find the key, so the connection fails.
Is it because it's trying to find the private key in the ~/.ssh directory on the remote box?
Is the article wrong?
Or am I doing something wrong?
Should I use the $SSH_ORIGINAL_COMMAND variable?
Regards, Stewart Williams
[1] http://www.linuxformat.com/pdfs/download.php?PDF=LXF105.tut_backup.pdf