- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] backing with rsync after ssh root disabled: permission denied
- From: jam@xxxxxxxxx
- Date: Wed, 15 Feb 2006 09:11:05 +0800
- User-agent: KMail/1.8
On Wednesday 15 February 2006 05:51, slug-request@xxxxxxxxxxx wrote:
> I was using like:
> rsync -avze root@server:/home /home
> to backup the server, after disabling root's ssh, I tried:
> rsync -avze myself@server:/home /home
> however, that fails as 'myself' has insufficient permissions;
>
> what the best way to handle this ?
For me the best solution was:
---- /etc/ssh/sshd_config
..
PermitRootLogin without-password
..
Then make sure the host you're going to (in this case yourself) has the public
key stored in authorized_keys. Also I don't backup to myself, but it's the
same. I did not bother to RFM but ... do you not need to specify (ssh
whatever) with -e?
#! /bin/sh
#
rsync -av -e ssh --delete /etc/ reggit:/tigger/etc
rsync -av -e ssh --delete /var/ reggit:/tigger/var
...
James