Open SSH configuration query
Saurabh Bhatnagar
saurabh.b.bhatnagar at oracle.com
Thu Jul 18 18:48:14 EST 2013
Hi Gert,
This is true that we can run the bat file but since this command is run as an argument to passive ssh, it returns back to prompt soon after.
What I need is to run the bat and then run my shell script in the *same* shell.
This is what I understood:
$ssh <server> "cmd.exe /c script.bat"
(This will run the bat file and return the prompt)
$
What I need is that when I do
$ssh <server> mainscript.sh
It should find the shares set above.
This will not happen as both are different ssh sessions.
Let me know now.
--
Warm Regards,
Saurabh Bhatnagar | Development Manager- Software config & Build Mgmt.
Phone: +918041836080 | Fax: +918041526000 | VOIP: +918041836080
Oracle Software Engineering
ORACLE India | Plot #1, NR ENCLAVE, EPIP INDUSTRIAL AREA, WHITEFIELD | 560066 BANGALORE
Oracle is committed to developing practices and products that help protect the environment
-----Original Message-----
From: Gert Doering [mailto:gert at greenie.muc.de]
Sent: Thursday, July 18, 2013 12:12 PM
To: Saurabh Bhatnagar
Cc: Gert Doering; Prashanth Maiya; Darren Tucker; openssh-unix-dev at mindrot.org
Subject: Re: Open SSH configuration query
Hi,
On Wed, Jul 17, 2013 at 07:50:15PM -0700, Saurabh Bhatnagar wrote:
> Our specific requirement is that:
>
> We need cygwin to know that when a SSH session is opened onto a Windows build server, it must map the required filer shares as n/w drives in the ksh env.
>
> We can't run our shell script in dos shell but in ksh where as the .bat file needs dos shell.
You can run cmd.exe from the ksh script, and cmd.exe will run bat files.
Please *read* what I write, and spend some time thinking about it (or even testing it), before you claim "it cannot be done".
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany gert at greenie.muc.de
fax: +49-89-35655025 gert at net.informatik.tu-muenchen.de
More information about the openssh-unix-dev
mailing list