The client tool ssh-add
wants to communicate with the background process ssh-agent
. You need to initializestart the ssh-agent
process first. On Linux, an Shell uses the environment variables SSH_AUTH_SOCK
and SSH_AGENT_PID
to identify the correct process to talk to.
You can do thisstart ssh-agent in multiple ways. Either by starting a new shell
ssh-agent bash
or by evaluating the script returned by ssh-agent
in your current shell.
eval "$(ssh-agent)"
I suggest using the second method, because you keep all your history and variables.