Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I use ubuntu server 10.04.

ssh-add /foo/cert.pem gave the following output

Could not open a connection to your authentication agent.

These are my running processes:

ps -aux | grep ssh
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root      1523  0.0  0.0  49260   632 ?        Ss   Dec25   0:00 /usr/sbin/sshd
root     10023  0.0  0.3 141304  6012 ?        Ss   12:58   0:00 sshd: padmin [priv]
padmin   10117  0.0  0.1 141304  2400 ?        S    12:58   0:00 sshd: padmin@pts/1
padmin   11867  0.0  0.0   7628   964 pts/1    S+   13:06   0:00 grep --color=auto ssh
root     31041  0.0  0.3 141264  5884 ?        Ss   11:24   0:00 sshd: padmin [priv]
padmin   31138  0.0  0.1 141264  2312 ?        S    11:25   0:00 sshd: padmin@pts/0
root     31382  0.0  0.3 139240  5844 ?        Ss   11:26   0:00 sshd: padmin [priv]
padmin   31475  0.0  0.1 139372  2488 ?        S    11:27   0:00 sshd: padmin@notty
padmin   31476  0.0  0.0  12468   964 ?        Ss   11:27   0:00 /usr/lib/openssh/sftp-server

These are my environment variables:

$ env | grep SSH
SSH_CLIENT=192.168.1.13 42626 22
SSH_TTY=/dev/pts/1
SSH_CONNECTION=192.168.1.13 42626 192.168.1.2 22

What is wrong? Why cant I add any identities?

Thanks.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You need to run ssh-agent first. You'll receive output like this:

SSH_AUTH_SOCK=/tmp/ssh-mZueDP7822/agent.7822; export SSH_AUTH_SOCK;
SSH_AGENT_PID=7823; export SSH_AGENT_PID;
echo Agent pid 7823;

Now just paste that into your terminal and add your keys.

share|improve this answer
    
not works without eval –  pylover Sep 22 '13 at 21:10

Of course atx answer is right but instead of copying you can run ssh-agent with eval.

eval `ssh-agent -s`
share|improve this answer
    
thanks, eval is mandatory. –  pylover Sep 22 '13 at 21:09

Your Answer

 
discard

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.