ssh -f and pid

Damien Miller djm at mindrot.org
Fri Feb 5 22:23:22 EST 2010


On Fri, 5 Feb 2010, Ming wrote:

> The monitoring software just needs to know the pid of the command executed.
>  That's all it needs to be plug and play.  And they only kill the process by
> pid.    Looking at all the times (via Google) you have offered the same ssh
> -O solution across the web to people have asked for a pid the years, it
> seems that it is *your* stance not to be "plug and play."
> 
> The few monitoring packages I experimented all expect a pid from the daemon.
> 
> Luckily, I could find one package, autossh, that specifically -- and only --
> monitors ssh.  Now, I have to run two packages, one to monitor ssh
> specifically and one for all my other daemons and scripts.
> 
> At least it works.  Would the security of openssh be so compromised by
> spitting out its pid?

It is difficult holding a conversation with someone who refuses to
listen to advice, so let me make this as simple as possible:

[djm at demiurge ~]$ ssh -nNfS ~/ctl-sock-blah localhost
[djm at demiurge ~]$ ssh -S ~/ctl-sock-blah -O check localhost
Master running (pid=3517)
[djm at demiurge ~]$ ssh -S ~/ctl-sock-blah -O exit localhost
Exit request sent.

Like I said, it is easy to determine the PID via the control socket.

-d


More information about the openssh-unix-dev mailing list