|Bill East on 14 Apr 2012 19:53:19 -0700|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: [PLUG] Rsync failing in cron due to ssh permissions|
On Sat, Apr 14, 2012 at 5:42 PM, Bill East <email@example.com> wrote:Your key does not have a password on it, does it? If so, you need to
> I've got a simple task, rsyncing a couple of directories. So I first tested
> in command line, then in a shell script, then in cron. The first two...
> worked. The last... didn't. Cron reported "failed to exec ssh - Permission
> denied (13)" So after some fruitless fiddling around I thought to try ssh on
> its own. A shell script that just did 'ssh -vv -l user -i /path/to/key
> destination.domain touch fred.txt'
> Again, worked from the command line and the script, failed from cron. I got
> the incredibly helpful cron error:
> /usr/bin/ssh: Permission denied.
provide that password to ssh. If you are running ssh from the command
line and have an ssh-agent running it could be helpfully providing the
key for you, which cron won't have access to.
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug