[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rsyncing via cron



Vineet Kumar [vineet@doorstop.net] wrote:
> * Andy Firman (list@firman.us) [030917 10:18]:
> > I have never used ssh-add but I am doing the same thing you are
> > and I used this very nice how-to that you may find useful:
> > 
> > http://killyridols.net/rsyncssh.shtml
> 
> Careful with that one.  I just took a glance at it, and it recommends
> using an unencrypted private key without a forced command on the remote
> host's authorized_keys.  This isn't _all_ bad, but I'd say it could be
> better, by adding some options in the remote host's authorized_keys to
> prevent this key from being used for anything but rsync, and only from a
> specified host.  I think I wrote up something about this on this list a
> while back; try http://google.com/search?q=vineet+rsync+authorized_keys
> .  If you can't find anything, let me know and I'll write it again.

If ssh-agent is running, and you have the proper keys in the proper
places, you simply need to set the SSH_AGENT_PID and SSH_AUTH_SOCK
environment variables.  Make sure to use the username@host: syntax
because the cron job may be running as root.

Cheers,
Bob McElrath [Univ. of California at Davis, Department of Physics]

    "Knowledge will forever govern ignorance, and a people who mean to
    be their own governors, must arm themselves with the power knowledge
    gives. A popular government without popular information or the means
    of acquiring it, is but a prologue to a farce or a tragedy or
    perhaps both."
        - James Madison

Attachment: pgpvTclB_3N73.pgp
Description: PGP signature


Reply to: