Re: How to kill port forwarding ssh when client exits
From: Darren Tucker (dtucker_at_dodgy.net.au)
Date: 01/09/05
- Next message: Darren Tucker: "Re: How to kill port forwarding ssh when client exits"
- Previous message: Darren Tucker: "Re: Restarting sshd without interruption"
- In reply to: Simon Tatham: "Re: How to kill port forwarding ssh when client exits"
- Next in thread: Darren Tucker: "Re: How to kill port forwarding ssh when client exits"
- Reply: Darren Tucker: "Re: How to kill port forwarding ssh when client exits"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 09 Jan 2005 04:39:09 GMT
In article <4ZC*jj-Dq@news.chiark.greenend.org.uk>,
Simon Tatham <anakin@pobox.com> wrote:
>Coincidentally, I had a need to do this today, and my solution is
>different again from either of the two so far posted. Here's mine.
[snip solution involving named pipes]
Neat!
The current version (post-3.9) of OpenSSH has another solution: you can
use the ControlMaster pipe to send commands to a backgrounded ssh.
This would be something like):
$ ssh -f -N -M ~/.ssh/server -L 25:your.mail.server:25 server
[do mail]
$ ssh -S ~/.ssh/server -O exit server
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
- Next message: Darren Tucker: "Re: How to kill port forwarding ssh when client exits"
- Previous message: Darren Tucker: "Re: Restarting sshd without interruption"
- In reply to: Simon Tatham: "Re: How to kill port forwarding ssh when client exits"
- Next in thread: Darren Tucker: "Re: How to kill port forwarding ssh when client exits"
- Reply: Darren Tucker: "Re: How to kill port forwarding ssh when client exits"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]