Mail Archives: cygwin/2002/11/05/15:43:32
Of course, a simpler alternative to setting up
'ssmtp' with cron would be to write your
cron job to redirect the output of 'ssh -v ...'
to a file.
> -----Original Message-----
> From: Harig, Mark A.
> Sent: Tuesday, November 05, 2002 3:40 PM
> To: nathan AT sleepygeek DOT com; cygwin AT cygwin DOT com
> Subject: RE: Can cron run ssh commands?
>
>
>
> Try adding '-v' to your ssh command in your cron job.
> This assumes that you have cron's integration with
> email working. If you don't have the 'ssmtp' package
> installed (via setup.exe), then you'll want to do that
> so that any output is emailed to you.
>
> See: /usr/doc/Cygwin/
> cron.README
> ssmtp-<version>.README
>
> Of course, you should probably start with a simpler
> cron job, say, the output of '/usr/bin/env' so that
> you can see what cron thinks its environment is.
>
>
> > -----Original Message-----
> > From: Nathan Barham [mailto:nathan AT sleepygeek DOT com]
> > Sent: Tuesday, November 05, 2002 3:09 PM
> > To: cygwin AT cygwin DOT com
> > Subject: Can cron run ssh commands?
> >
> >
> > Hello all,
> >
> > I'm trying to use Cygwin to rsync between an NT 4 server and
> > a Win2K server,
> > using the "-e ssh" option to rsync. It works beautifully at
> > the command line
> > like this:
> >
> > rsync -e ssh -trzv --delete /d/winapps/
> Administrator AT baby:/c/winapps
> >
> > My problem is that this won't work from cron, nor will any of
> > the other Openssh
> > tools (scp, ssh etc). I have Cygwin sshd running as
> > Administrator on the remote
> > W2K box, i.e.*without* privsep. I have Cygwin cron running
> > as SYSTEM on the
> > local NT 4 box. I've tested cron and it works except for ssh
> > stuff. I also
> > have ssh-agent loaded on the local box (via keychain), and I
> > can ssh to the
> > remote box as Administrator without typing a passphrase.
> >
> > I'm pretty sure my problem is related to permissions of the
> > SYSTEM user and/or
> > the switching of user context, but I can't figure out what to
> > change. I've read
> > the user guide and FAQ, googled, and searched the mail
> > archives, but if it's
> > there I'm missing it. Has anyone out there managed to
> > automate ssh commands
> > from cron? If so can you please enlighten me, or at least
> > kick me in the
> > direction of self-enlightment?
> >
> > cygcheck stuff for each machine is attached.
> >
> > Thanks tons for any help.
> >
> > Nathan Barham
> >
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -