A.2 Configuring the ssh Key Agent

In order to use the newly generated private key, you must start the ssh key agent, ssh-agent, and add the key to the set of keys held by the agent. In order to have the keys available whenever you log on, edit the ~/.bash_profile file. The following shell script snippet should be inserted at the end of the file:

if [ -z "$SSH_AUTH_SOCK" ]; then
  eval $(ssh-agent)
  ssh-add
fi

After saving ~/.bash_profile, log off and log back in to the staging host. You are prompted for the private key passphrase entered when the key pair was generated. After you successfully enter the passphrase, the private key is available for generating authentication tokens.