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

Robert Brockway rbrockway-wgAaPJgzrDxH4x6Dk/4f9A at public.gmane.org
Sun Feb 5 00:41:57 UTC 2006


On Sat, 4 Feb 2006, William Park wrote:

> What is proper way to use 'ssh-agent' and 'ssh-add'?
>
> Manpage says, 'ssh-agent' is to be run within login console, like
>    eval `ssh-agent -s`
> and killed with
>    eval `ssh-agent -s -k`
> If I put that in ~/.profile, then I have to type my passphrase on every
> login console or xterm.  Very painful.
>
> I would like to run 'ssh-add' once, either at console or Xterm; and,
> after that, all my ssh activities should lookup 'ssh-agent', whether I'm
> at virtual consoles or Xterms.

I have the following at the end of my ~/.xsession, to use ssh-agent with 
X:

# Allow ssh-agent to kick off the window manager ($MANAGER)
ssh-agent bash -c "ssh-add < /dev/null && $MANAGER"

$MANAGER is the full path to your window manager set earlier in the 
script.

Rob

-- 
Robert Brockway B.Sc.        Phone:          +1-905-821-2327
Senior Technical Consultant  Urgent Support: +1-416-669-3073
OpenTrend Solutions Ltd      Email:          support-wgAaPJgzrDxH4x6Dk/4f9A at public.gmane.org
                              Web:            www.opentrend.net
We are open 24x365 for technical support.  Call us in a crisis.
--
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