Bug#303452: add -o PidFile option to ssh
tags 303452 fixed-upstream
thanks
On Wed, Apr 06, 2005 at 02:39:37PM -0500, Adam Heath wrote:
> Package: openssh-client
> Version: 3.9p1-3.1
> Tags: experimental patch
>
> When ssh -f is used, ssh forks into the background. However, it's then
> difficult to kill that backgrounded ssh automatically, from other scripts.
> Thet attached patch tells ssh to write a pid file. This happens irregardless
> of whether -f is used, however.
>
> This makes my ssh -MS wrapper more robust(ssh is buggy when -MNS pipe is used,
> but not -f, and then you later reconnect to that master; the first slave works
> fine, but subsequent slaves deadlock).
The OpenSSH 4.0p1 announcement includes this paragraph:
* Improved connection multiplexing support in ssh(1). Several bugs
have been fixed and a new "command mode" has been added to allow the
control of a running multiplexing master connection, including
checking that it is up, determining its PID and asking it to exit.
So I can now do this:
$ ssh -M -S ~/.ssh/riva.ctl -f riva xterm
$ ssh -S ~/.ssh/riva.ctl -O check riva
Master running (pid=29142)
$ ssh -S ~/.ssh/riva.ctl -O exit riva
Exit request sent.
I think that should satisfy this bug report, albeit in a different way.
Cheers,
--
Colin Watson [cjwatson@debian.org]
Reply to: