0
Have a look at the following shell session:
niklas@llw ~ % ssh-agent && ssh-add
SSH_AUTH_SOCK=/tmp/ssh-ZzWYJAmK8809/agent.8809; export SSH_AUTH_SOCK;
SSH_AGENT_PID=8810; export SSH_AGENT_PID;
echo Agent pid 8810;
Enter passphrase for /home/niklas/.ssh/id_rsa:
Identity added: /home/niklas/.ssh/id_rsa (/home/niklas/.ssh/id_rsa)
niklas@llw ~ % killall ssh-agent
niklas@llw ~ % ssh-agent && ssh-add
SSH_AUTH_SOCK=/tmp/ssh-TNMkMvgP8880/agent.8880; export SSH_AUTH_SOCK;
SSH_AGENT_PID=8881; export SSH_AGENT_PID;
echo Agent pid 8881;
Could not open a connection to your authentication agent.
Why can I run ssh-agent && ssh-add
only once?
You are absolutely right. There was already an agent running, which is started before I log in, namely with the
use-ssh-agent
in/etc/X11/Xsession.options
and its implementation in/etc/X11/Xsession.d/90x11-common_ssh-agent
. I now simply runssh-add
. – nh2 – 2013-02-25T01:25:44.950