delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/09/09/18:20:31

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=eE5
ZQMUotwvj5OG5w/obKML2L9Vkpz0xPvbnrPcsDidZASqCv2YV1kMfZlAk3QJB8yw
7FdTrfBd1xFGVx1oL69VhbiSjLq07G9OQFKxOe/BcEAVzggdmiFYYKNF6jB51J56
Z3fPDur/qiNzOoXobIhnogkKjYRfViMLjDrkbBrA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; s=default; bh=GGU7p6RZS
S0x60TVyZeOn+ueSks=; b=Yp87tS+cMMwXeQT2dhqHJl3vCBjDO6ZQ+eqonbHwV
V7s2Rfn5RzxwoDfW0LVlEBW4qgXwsUE+hniik627VpLngR9res21rlzB8NGbaR1w
Pxjva9wEMieE8js560NwckMJ0lC0iHFySHgzVxp00GemOco33X4WAhhFklcQIMZc
2A=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: plane.gmane.org
To: cygwin AT cygwin DOT com
From: Jim Reswick <Jim AT ReswickGallery DOT com>
Subject: Unable to execute local scripts to run commands through SSH from Cygwin
Date: Tue, 9 Sep 2014 22:08:28 +0000 (UTC)
Lines: 48
Message-ID: <loom.20140910T000537-133@post.gmane.org>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes

Hi:

I'm trying to run a command string on a Linux box from a Winows 2008 box. 
I've got Cygwin64 installed and ssh working with public keys. I have two 
test scripts on the Windows box. The first script contains the command 
line that I desire to execute on the Linux box. The second script calls 
the first script passing the command line in the first script to the Linux 
box for execution (at least that is what is intended).

Here is the first script executed in the Cygwin session on the Windows box:

srv_imgctrlmsqladmin AT RCOVSVR0414 ~
$ . /home/srv_imgctrlmsqladmin/test2.sh
hello world

Here is the command line from the second script copied and pasted and 
executed in the Cygwin session:

srv_imgctrlmsqladmin AT RCOVSVR0414 ~
$ /bin/ssh rcolnx89114 -l sukpewek 'bash -s' 
< /home/srv_imgctrlmsqladmin/test2.sh
hello world

Here is what I get when I execute the second script in the Cygwin session 
(that contains only the same command line as above):

srv_imgctrlmsqladmin AT RCOVSVR0414 ~
$ . /home/srv_imgctrlmsqladmin/call_test.sh
: No such file or directorydmin/test2.sh

I've tried several other variations of the same process above, but its 
always the same thing...Command line works fine on the remote Linux box, 
but the script calling the identical command line does not.

I'm a newbie and no great Unix script coder, and any help would be much 
appreciated...

Jim 
         

jreswick 
View Public Profile 
View LQ Blog 
View Review Entries 
View HCL Entries 
Find More Posts by jreswick 
Add jreswick to Your Contacts 



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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