Hi there,
I'm relatively new to Debian server management and am having some problems setting up rsnapshot to ssh into my remote server without a password.
I have set up the ssh passwordless access without any trouble at all. I have:
- created a user on the remote server called 'bkp' and given it a root directory and password.
- generated a public key on my local server ($ ssh-keygen -t rsa) and copied to the authorized_keys file on the remote server ($ ssh-copy-id -i ~/.ssh/id_rsa.pub username@remote_host)
I can now log in with SSH without a password.
I then set up rsnapshot which is configured correctly and preforms the desired tasks when I run it manually ($ rnapshot hourly) however it will always ask for the remote users password.
Below is the output:
uvdev@leo:/backup$ sudo rsnapshot hourly
Setting locale to POSIX "C"
echo 2098 > /var/run/rsnapshot.pid
mv /backup/tmp/hourly.3/ /backup/tmp/hourly.4/
mv /backup/tmp/hourly.2/ /backup/tmp/hourly.3/
mv /backup/tmp/hourly.1/ /backup/tmp/hourly.2/
/bin/cp -al /backup/tmp/hourly.0 /backup/tmp/hourly.1
/usr/bin/rsync -av --delete --numeric-ids --relative --delete-excluded \
--exclude='data/session/*' --rsh=/usr/bin/ssh \
bkp@83.222.226.237:/var/www/staging/HalEvents/logs \
/backup/tmp/hourly.0/logs/
bkp@83.222.226.237's password:
receiving incremental file list
sent 39 bytes received 173 bytes 6.52 bytes/sec
total size is 151767 speedup is 715.88
touch /backup/tmp/hourly.0/
rm -f /var/run/rsnapshot.pid
/usr/bin/logger -i -p user.info -t rsnapshot /usr/bin/rsnapshot hourly: \
completed successfully
I have also tried running the rsync command (from the output above) directly therefore excluding rsnapshot and I am NOT asked for a password in this instance. Therefore the problem seems to be limited to only rsnapshot.
If anyone has any advice it would be gratefully received.
Many thanks,
Gareth
