Proper way to use 'ssh-agent' and 'ssh-add' ?

Fraser Campbell fraser-eicrhRFjby5dCsDujFhwbypxlwaOVQ5f at public.gmane.org
Sun Feb 5 04:26:00 UTC 2006


William Park wrote:

> Does every user need his/her own 'ssh-agent'?  Or, is single 'ssh-agent'
> (say, from /etc/rc.d/...) enough for whole machine?

When I run ssh-agent the following (important) things happen:

   SSH_AUTH_SOCK=/tmp/ssh-xqWDAU1536/agent.1536; export SSH_AUTH_SOCK;
   SSH_AGENT_PID=1537; export SSH_AGENT_PID;

If you stuff the above into a file then it shouldn't be hard on 
subsequent logins to source the file, check for existence of 
SSH_AGENT_PID and either use it (if it exists) or create a new agent 
process (if it doesn't exist).

The socket file will be r/w for the user that created it and not 
accessible to anyone else.  So if user bob runs ssh-agent then only bob 
and root could use that agent.
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list