Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I am using the terminal directly on the machine running Ubuntu 13.04 ssh-add works fine using the process:

/usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session /usr/bin/im-launch gnome-session --session=ubuntu

The above process is only started when I log in on the physical machine though.

However, when I login remotely using PuTTY and try ssh-add I instead get:

"Could not open a connection to your authentication agent."

This is even if I am logged in on the actual machine and thus the ssh-agent process is running as shown above.

To get it working via PuTTY I have to run exec ssh-agent bash. But then I have two ssh-agent's running.

Is this normal or is there any way I can change the configuration so the ssh-agent is running automatically no matter if I log in on the machine direct or remote?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.