if (! $?SSH_AUTH_SOCK ) then eval `/usr/sww/bin/ssh-agent -c` # test for additional (maybe leftover) ssh-agent processes: # note that this gets both ssh1 and ssh2 agents set strays = `/bin/ps -eaf|grep ${USER}'.*ssh-agent'|grep -v grep|grep -v $SSH_AGENT_PID |awk '{print $2}'` if ( `echo $strays | /usr/ucb/wc -m` > 0 ) echo Other ssh-agent processes owned by ${USER}: $strays /usr/sww/bin/ssh-add endif if (! $?SSH2_AUTH_SOCK ) then if ( -x /usr/local/bin/ssh-agent2 || -x /usr/sww/bin/ssh-agent2 ) then # ...then I have found an ssh-agent2 in my usual path, so... eval `ssh-agent2 -c` ssh-add2 endif endif