“Could not open a connection to your authentication agent” SSH-Add Error

When `ssh-add` does not work as expected because a ‘Could not open a connection to your authentication agent.’ error comes out, this might help:

eval `ssh-agent`

There are environment variables that needs to be set and doing the command above will essentially do just that but with far lesser key strokes. It is also easier to remember since those archaic commands and environment variables that needs to be set always escape my mind.

However, do check that an ssh-agent daemon is running in the background. This can be done easily with `ps aux|grep agent` command. Supposedly, the agent should be running as it is started at the “beginning of an X-session or a login session.”

Similar Posts: