On 2011-10-30 20:04, Sime Ramov wrote: > I've found the following clever ssh-agent stanza in Richard Crowley's > `.profile`[https://raw.github.com/rcrowley/home/master/.profile]: ... > It works partially, i.e. it spawns a new agent on every shell > invocation.
It should probably test for functionality, something like: ssh_agent_check () { for sock in {$TMPDIR,/tmp}/ssh-*/agent* do export SSH_AUTH_SOCK=$sock ssh-add -l && return done eval `ssh-agent` } Patrick