ssh -f and pid

Ming minger at
Fri Feb 5 15:03:06 EST 2010

I'd like to second the patch -- or functionality like it -- that
Folkert van Heusden proposed twelve months ago for the distribution.

Without ssh -f returning the pid to the caller, numerous daemon and
script monitor packages can't manage ssh, as they can countless other
daemons that properly return pid.  A monitor needs to record the pids
of ssh processes it has started to kill them or to know when they have
died.  Proper keep alive settings are no use against connections reset
by peer.

> Hi,

Ssh -f forks itself in the background. Very usefull if you would like to
e.g. tunnel munin over ssh. Now it's tricky to terminate one process if
you have multiple running.
It seems that ssh currently (looked at 5.1p1) has no write-pid-to-file
So I implemented a patch which do so. Tested it a little and it seems to
work. Hopefully it is of any use in my form or inspires the developers
to implement this kind of functionality in the ssh distribution.

More information about the openssh-unix-dev mailing list