Server Fault is a question and answer site for system and network administrators. 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

I have installed Ubuntu 11.10. I'm being confused by the ssh-agent behavior: when I enter the command I get the following output:

SSH_AUTH_SOCK=/tmp/ssh-qKBOsDj10698/agent.10698; export SSH_AUTH_SOCK;
echo Agent pid 10699;

And that's it, the agent doesn't run. :( Any suggestions?

share|improve this question
Did you check it's not running ps -ef | grep 10699 ? – Iain Jan 5 '12 at 17:26
Ah, apparently it is running... I got confused by the response above. I'm still a n00b on Linux; sorry and thanks for your time! – Berislav Lopac Jan 5 '12 at 20:34
No worries - the answers below will help you anyway. – Iain Jan 5 '12 at 20:40

If you are running ssh-agent by hand, you typically run

ssh-agent bash

. Then in that bash shell it will be able to talk to the agent, and you can use ssh-add to add your ssh-keys. If you are trying to use it within X11, many distros already start the ssh-agent. Try running:

share|improve this answer

The agent is (probably) running (check your ps output - From your example you probably have a copy of ssh-agent running as PID 10699).

If you consult the ssh-agent man page (man ssh-agent) you will find that when you launch ssh-agent from a command line two things happen:

  1. The agent starts
  2. You get some output (specific to the type of shell you're running, or for whatever type of shell you specify) that will set up environment variables to tell ssh how to connect to the agent.

To make your shell swallow the output you want to do something like:

eval `ssh-agent`

or run the commands that it dumped on your terminal manually.

The man page also has details on the other way of launching an agent (ssh-agent [programname] - which will launch [programname] with the appropriate environment variables set).

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.