Home:ALL Converter>shutdown dynamically created putty ssh tunnel

shutdown dynamically created putty ssh tunnel

Ask Time:2014-09-10T15:37:05         Author:Wolfgang Adamec

Json Formatter

We have a windows program. This program performs a soap request to a server in our DMZ (it is a direct HTTP request to - let's say 192.168.100.10).

Now - for security reasons, we have to change the setting. The request should go via a secure channel to the server.

The future workflow has to be the following:

  • Before we start the SOAP request, we have to call "putty.exe" with special parameters in order to dynamically create a secure tunnel.

    putty.exe -L 5510:192.168.100.10:8080 -l user1 -i c:\private_key.ppk 192.168.100.10

  • After this we perform the soap request to "localhost:5510". The dynamically created secure tunnel will foward the packets of the request through the ssh channel to the web server of 192.168.100.10. The response will come the same way back.

  • After a list of maybe 500 requests have been performed, the secure tunnel should be closed and the program should be ended.

Apart from getting the process id of the putty process and killing the process, is there any other way to close the putty secure ssh tunnel?

Thanks alot in advance

Author:Wolfgang Adamec,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/25759790/shutdown-dynamically-created-putty-ssh-tunnel
yy