[ILUG] Passwordless SSH access

Ronan Waide waider at waider.ie
Tue Mar 19 11:31:21 GMT 2002


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.




More information about the ILUG mailing list