[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A question about ssh-agent



On 20120204_093544, Sven Joachim wrote:
> On 2012-02-04 09:09 +0100, Scott Ferguson wrote:
> 
> > On 04/02/12 19:05, Paul E Condon wrote:
> >> 
> >> Where in the start-up code of a system that is running ssh client is
> >> the ssh-agent started? It has got to be early in the process, but
> >> where?  And what exactly is done? Should I be able to see it in an
> >> init.d script?  It is a daemon, but it is only needed to support an
> >> add-on feature of as ssh client so it should be part of the code that
> >> gdm/xdm runs, I suppose. Or what? There should be distinct instances
> >> of the agent for each user, I think. Or is there a single single
> >> instance that maintains a list of logged in users and their several
> >> private keys? How is it really implement. I get the impression that it
> >> is different ways on different systems. I'm only interested in the
> >> Debian implementation (because it is the only one I can check up on)
> >> It seems that it is not run when I log into a host using ssh or more
> >> exactly its pid is not exported to an ssh login process. Could I add
> >> something to the .profile script? If this is possible, it surely
> >> has been thought of before me and better and worse ways of doing
> >> have been discussed, but I'm not finding anything. Pointers to
> >> HOWTOs? Is there a common name for doing this? Etc.
> >> 
> >> TIA
> >> 
> > /etc/init.d/ssh (it's a link from /etc/rc2.d)
> 
> Nope, this is the script that starts the ssh *server*.  The agent is
> started in /etc/X11/Xsession.d/90x11-common_ssh-agent, sourced from
> /etc/X11/Xsession (see Xsession(5).
> 
> Sven

Thanks, Sven

>From the Xsession(5) man page:

"Administrators unfamiliar with the Bourne shell will likely find the
Xsession.options(5) configuration file easier to deal with than
Xsession itself."

No doubt true, but I fancy myself to be a reasonably adept, all be it
slow, reader of Bash (making frequent use of 'man bash'.)

I likely will resurface in a few days/weeks with further questions.

And you are right about /etc/init.d/ssh . Its name is a misnomer.
It should be called /etc/init.d/sshd 
but maybe not...

Maybe the maintainer of the ssh init script could introduce a
comment about ssh-agent into the script giving the information
that you have just given here. I think this might be done
without wider ramifications to the overall installed code of
Debian, as would surely be entailed by changing the name of the 
script. Just a few lines of comment where almost everyone who is
curious this will look. Especially if the misnomer is preserved.

-- 
Paul E Condon           
pecondon@mesanetworks.net


Reply to: