chloe K wrote: > Hi > > I put the rsync in cronjob > but it won't work > > in root user cron > > */30 * * * * /home/chloe/rsy.sh >/dev/null 2>&1 > > 1/ why it needs pw when I run this rsy.sh in root? > but if I run it in chloe user, it doesn't need pw as I put authoized_key > in remote host chloe Assuming your key doesn't need a passphrase, authorized keys work because the remote side has the public part which is uses to make sure that the connecting process can read the private part - which, unless you say otherwise, is expected to be in $HOME/.ssh/ > > 2/ why this root cronjob is not working? what wrong? I can't see this > cron in message > > the rsy.sh is below > > #! /bin/sh > rsync -essh -av chloe@remotehost:/var/www/html > <mailto:chloe@remotehost:/var/www/html> /backup/html If it works when logged in as yourself, the right identity key is probably in your own $HOME/.ssh/ directory. If you gave a passphrase when you created the keys, then it is a bit more complicated. -- Les Mikesell lesmikesell@xxxxxxxxx _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos