Anthony de Sousa
2007-08-01 04:44:32 UTC
I am hoping that someone may be able to advise as to whether the following is
possible. I have a server running SSH as a service (SRVA) and another server
(SRVB) which runs the SSH client and port forwards port 139. On SRVB I have
an existing BAT file that I wish to wrap the port forwarding around so that
port 139 goes through port 22. This all works except that I also wand to drop
the SSH connection after the BAT file has finished what it needs to do. Is
this possible as I am finding that I end up with two command windows with one
still running the SSH connection. The simple BAT that I initiate is as follows:
@echo off
cd c:\dirb
rem the following line starts the existing bat file in a seperate window
Start run1.bat
rem
cd c:\cygwin\bin
bash -c "(ssh -N -L 10.0.0.1:139:20.250.205.96:139 ***@srvb)"
As stated this all works and the output of run1.bat is transferred to SRVB
however I would like the connection dropped and the window terminated.
Thanking you in advance
Tony
possible. I have a server running SSH as a service (SRVA) and another server
(SRVB) which runs the SSH client and port forwards port 139. On SRVB I have
an existing BAT file that I wish to wrap the port forwarding around so that
port 139 goes through port 22. This all works except that I also wand to drop
the SSH connection after the BAT file has finished what it needs to do. Is
this possible as I am finding that I end up with two command windows with one
still running the SSH connection. The simple BAT that I initiate is as follows:
@echo off
cd c:\dirb
rem the following line starts the existing bat file in a seperate window
Start run1.bat
rem
cd c:\cygwin\bin
bash -c "(ssh -N -L 10.0.0.1:139:20.250.205.96:139 ***@srvb)"
As stated this all works and the output of run1.bat is transferred to SRVB
however I would like the connection dropped and the window terminated.
Thanking you in advance
Tony