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

Re: rsyncing via cron



hey nori,

On Sat, Feb 08, 2003 at 12:31:00PM -0500, Nori Heikkinen wrote:
> how can i create a cron job to rsync to a remote system?  i use
> ssh-askpass, but since cron runs as root, i get

ssh-askpass is just a frontend to ssh-add, which is just a means for
loading keys into your ssh-agent.  assuming you're not running
cron as a child of an ssh-agent process (which granted, would be
sweet), i don't think it'd help much.  if you're trying to use
public key authentication, what you need is a passphraseless key
(which i'm guessing you may already have) just for the job, called
say .ssh/id_dsa_cron and .ssh/id_dsa_cron.pub.  after you put the
public key in your authorized keys file, you're basically set.  all
you need to do is

export RSYNC_RSH="ssh -i .ssh/id_dsa_cron"
rsync ....

or

rsync -e "ssh -i .ssh/id_dsa_cron" ....

and then the ssh session spawned by rsync should attempt to authenticate
with your key.


hth
	sean

Attachment: pgpxoJLctYY_B.pgp
Description: PGP signature


Reply to: