Security Basics mailing list archives

Re: RES: Is SSH worth it??


From: Richard Caley <richard () caley org uk>
Date: Mon, 14 Oct 2002 14:38:18 +0100 (BST)

#!/bin/sh
set agent =~/agent-info
if (-r agent) then
  source $agent
else
  echo "Can't find or read agent file"
  exit 1

Just a couple of tweaks to this. I think it is useful to check if
there is already an agent we can talk to and also to make the file
per-host. What I do at the top of scripts is (something like):

      ssh-add -l >/dev/null 2>&1 ||
            [ ! -f $HOME/.ssh/agent_env_`hostname` ] ||
                . $HOME/.ssh/agent_env_`hostname`

If anyone is interested, the script I run from my .bashrc (for
interactive sessions) to start or attach to the agent is too big for
this margin, so I have put it at:

    http://richard.caley.org.uk/FreeBSD/ssh_agent.bash

      ^_^
     (O O) 
     \_/@@\
      \\~~/ 
        ~~
                - RJC


Current thread: