crontab + rsync problem
Andrew Glen-Young
aglenyoung at gmail.com
Thu Oct 11 13:10:03 UTC 2007
On 11/10/2007, Luca Ferrari <fluca1978 at infinito.it> wrote:
> On Thursday 11 October 2007 Andrew Glen-Young's cat, walking on the keyboard,
> wrote:
> > I personally use separate user accounts, unique ssh keys without
> > passphrases and authorized_keys files with 'from' and 'command'
> > patterns in them. This, however, might not suit you.
>
> I didn't get this very weel, could you please explain me better? I have
> already separate accounts and ssh keys without passpharase, but I don't
> understan what you mean with "from" and"command".
>
These options to the 'authorized_keys' file is very well documented in
the sshd(8) man pages and will explain much better than I ever could.
Look in the 'AUTHORIZED_KEYS FILE FORMAT' section. You can place
restrictions for hosts that are allowed to use the key , etc. This is
only necessary if you're feeling paranoid ;-)
If you're using keys *without* passphrases, then I'm not sure why you
are required to use ssh-agent? You can edit your '~/.ssh/config' file
or run rsync with the '-e' switch to achieve the same thing.
example rsync command:
rsync -av -e "ssh -p 22000 -i ~/.ssh/somehost-id_rsa" \
someuser at somehost.example.com:/path/to/dir /path/to/dest
example ~/.ssh/config:
Host somehost.example.com
IdentityFile ~/.ssh/somehost-id_rsa
Protocol 2
User someuser
Port 22000
$ ssh -v somehost.example.com
debug1: Reading configuration data /home/user/.ssh/config
debug1: Applying options for somehost.example.com
debug1: Applying options for *
debug1: Connecting to somehost.example.com [192.168.0.1] port 22000
[...]
- A.
More information about the ubuntu-users
mailing list