How is SSH_AUTH_SOCK setup and used by ssh-agent?
Asked Answered
T

1

60

I have been able to setup the sharing of ssh-agent for public-key authentication after reading https://superuser.com/a/230872/301446

The environment file thus generated has the following contents:

SSH_AUTH_SOCK=/tmp/ssh-OwqeSuxmEsQN/agent.4744; export SSH_AUTH_SOCK;
SSH_AGENT_PID=8960; export SSH_AGENT_PID;
#echo Agent pid 8960;

And agent.4744 has:

!<socket >24194 s 07DF88C6-E9997283-4C471010-2FE57D77

Would you know how this socket is used by ssh-agent? I can understand that it's used by ssh-agent to share authentication information but exactly how?

Traditionalism answered 3/3, 2014 at 18:28 Comment(0)
O
45

From here:

$SSH_AUTH_SOCK contains the path of the unix file socket that the agent uses for communication with other processes. This is essential for ssh-add.

Obtest answered 4/4, 2014 at 2:39 Comment(6)
Broken link, now here - blog.joncairns.com/2013/12/understanding-ssh-agent-and-ssh-addKauffman
That blog post helped me a lot to understand the real problem. Highly recommendedUracil
both links now brokenBaxie
tnx, I forgot to make ssh-addPilaf
@Baxie works for me: blog.joncairns.com/2013/12/understanding-ssh-agent-and-ssh-addPellikka
I would argue the method depicted here is better than the one suggested in joncairns blogTabulate

© 2022 - 2024 — McMap. All rights reserved.