openssh-unix-dev May 2011 archive
Main Archive Page > Month Archives  > openssh-unix-dev archives
openssh-unix-dev: Re: ssh-agent subprocess parentage

Re: ssh-agent subprocess parentage

From: Phil Pennock <phil.pennock_at_nospam>
Date: Tue May 10 2011 - 10:10:14 GMT
To: openssh-unix-dev@mindrot.org

On 2011-05-09 at 17:13 -0400, Daniel Kahn Gillmor wrote:
> I'm pretty sure this is actually how it works. ssh-agent forks, and is
> two processes concurrently. Each process (the parent and the child)
> gets to decide what to do next. In ssh-agent, the parent process
> exec()'s the subcommand, while the child process lives on as an agent.

I misinterpreted which process you meant when you said parent. I
apologise.

Curiously, [gpg-agent --daemon cmd] does the exact same thing.

Safety measure so that if the agent dies you don't get left with a login
program reaping its child and resetting the tty while the shell is still
active? ssh to localhost, then run a second shell, in that kill -9
$PPID, see yourself disconnected while the shell you were typing into is
still running.

-Phil
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev