Jeff Garzik <jgarzik@mandrakesoft.com> writes:
> For those with multiple peer shells and no X-parented ssh-agent, you
> will need to run ssh-agent ONCE, like so:
>
> ssh-agent > ~/tmp/ssh-agent.out
>
> and then for each shell, you need to run:
>
> eval `cat ~/tmp/ssh-agent.out`
>
> and then run the ssh-add command from above.
I keep the following in my .bashrc and use the `agent' command to
initialize the ssh-agent.
# Allow `agent' to start the ssh-agent usefully on all running
# bash instances. SIGQUIT was chosen because it is ignored by
# bash by default, even in non-interactive shells, so that a
# shell not trapping it by some chance won't be terminated.
if test -f ~/.ssh/agent; then
. ~/.ssh/agent
fi
function agent {
killall -q ssh-agent
ssh-agent > ~/.ssh/agent
killall -QUIT bash >/dev/null 2>&1
ssh-add ~/.ssh/identity
ssh-add ~/.ssh/id_dsa
}
trap -- '. ~/.ssh/agent' SIGQUIT
-- "Be circumspect in your liaisons with women. It is better to be seen at the opera with a man than at mass with a woman." --De Maintenon - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Feb 15 2002 - 21:00:30 EST