On March 19, niall at linux.ie said:
> the existing values. If he logs in via ssh from another box, then I want him
> to start ssh-agent from his shell start script, unless it's already running,
> in which case I want him to pick up the values from that. That is proving a
> little tricky.
>>> Niall
My own setup works approximately thusly:
if $TMPDIR/`hostname`.ssh exists
source $TMPDIR/`hostname`.ssh
kill -0 $SSH_AGENT_PID
if that fails, ssh-agent > $TMPDIR/`hostname`.ssh and go back to the
top of this block
if ssh-add -l has no dsa key
ssh-add my dsa key
if ssh-add -l has no rsa key
ssh-add my rsa key
which works reasonably sanely. The ssh-add stuff is further tweaked to
give a ssh-askpass dialogue if there's an X display handy, otherwise
it'll fall back to the tty interface.
Cheers,
Waider.
--
waider at waider.ie / Yes, it /is/ very personal of me.
"They posted while drunk, their souls are forfeit."
- Bren, in the dspsrv orientation guide.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!