Repost: [patch] Automatically add keys to agent
Peter Stuge
peter at stuge.se
Sun Jan 17 07:19:52 EST 2010
Joachim Schipper wrote:
> I am a bit disappointed by the total lack of response - does nobody else
> have this problem?
It's not a big problem for me. I wrote a script which is sourced from
.bashrc.
--8<-- .ssh/agent.sh
#!/bin/bash
source /etc/profile
source ~/.ssh/.agent.env 2>/dev/null
ssh-add -l >/dev/null 2>&1
ret=$?
case $ret in
2)
ssh-agent | grep '^SSH_\(AGENT_PID\|AUTH_SOCK\)=' > ~/.ssh/.agent.env
source ~/.ssh/.agent.env
ssh-add -c
;;
1)
ssh-add -c
;;
*)
;;
esac
-->8--
//Peter
More information about the openssh-unix-dev
mailing list