How to kill port forwarding ssh when client exits

From: HK (pifpafpuf_at_gmx.de)
Date: 01/07/05


Date: 7 Jan 2005 05:06:49 -0800

Hi,

with port forwarding like

ssh -L 5432:host.at.work:25

I am able to access the mail server at
work to send email with a local
client (mutt + esmtp in this case).

Is it possible to automatically shut down
the forwarding when the client exits. Of
course I could wrap the client in a script
which starts the port forwarding, picks up
its PID, runs the client and then kills
the PID, but maybe there is something built
into ssh to do exactly this.

  Thanks,
  Harald Kirsch.



Relevant Pages

  • Re: Connecting to MySQL on a Linux box from Borland JBuilder Foundation X
    ... I assume your client is running on a Windows box? ... You can set up an ssh ... port forwarding solution using, for example, PuTTY (a freely available ssh ... You would run PuTTY on your client machine, ...
    (comp.lang.java.databases)
  • Re: ssh port forwarding
    ... > I want to use ssh port forwarding to make a secure channel between client ... I had find a lot of info about how to setup port forwarding ... > setup that in the client side but I want to setup it only in the server ...
    (comp.os.linux.setup)
  • Port forwarding not working on ssh.com client
    ... I have the free version of the SSH client from www.ssh.com on a Laptop running Vista. ... Has anyone got this client working with port forwarding under Vista? ...
    (comp.security.ssh)
  • ssh port forwarding
    ... I want to use ssh port forwarding to make a secure channel between client ... and server CVS. ... I had find a lot of info about how to setup port forwarding ...
    (comp.os.linux.setup)
  • Re: Host_Name()
    ... > HOST_NAME kann von jedem Client beliebig gesetzt werden. ... WSID, PID: ... Auch wenn ich Serienbriefe in Word erstelle, verbinde ich in Word mit dem ... Next by Date: ...
    (microsoft.public.de.sqlserver)