SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Rsnapshot with passwordless SSH access-still requests psswd
Author Message
Post Rsnapshot with passwordless SSH access-still requests psswd 
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

View user's profile Send private message
Post Rsnapshot with passwordless SSH access-still requests psswd 
On 13 April 2011 11:54, garethfoote <rsnaphshot-forum < at > backupcentral.com ([email]rsnaphshot-forum < at > backupcentral.com[/email])> wrote:
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.

as which user are you testing this on your local server, and as what users are you running rsnapshot auomatically

I suspect the former to be some specific users, and the latter to be root.
--
Met vriendelijke groet,
Serge van Ginderachter

Post Rsnapshot with passwordless SSH access-still requests psswd 
Hi there,

Apologies for the slow response. I was never notified that I had a reply.

I am running rsnapshot whilst logged in as the user 'uvdev' which is the same user that can ssh into the remote machine without a passphrase. Therefore I think I'm running everything under the one user.

I haven't got to the point where I can set up cron jobs yet because run "$ rnapshot hourly" is not being successful. I presume that this command doesn't instantiate a cron job?

Thanks again,
Gareth

View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB