delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/05/15:43:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0
content-class: urn:content-classes:message
MIME-Version: 1.0
Subject: RE: Can cron run ssh commands?
Date: Tue, 5 Nov 2002 15:43:18 -0500
Message-ID: <BADF3C947A1BD54FBA75C70C241B0B9E76302D@ex02.idirect.net>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
From: "Harig, Mark A." <maharig AT idirect DOT net>
To: <nathan AT sleepygeek DOT com>, <cygwin AT cygwin DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id gA5KhUR18580

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019