Unable to execute local scripts to run commands through SSH from Cygwin
Jim Reswick
Jim@ReswickGallery.com
Tue Sep 9 22:20:00 GMT 2014
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@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@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@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
More information about the Cygwin
mailing list