How is SSH_AUTH_SOCK setup and used by ssh-agent?

巧了我就是萌 提交于 2019-12-21 03:16:13

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/22154423/how-is-ssh-auth-sock-setup-and-used-by-ssh-agent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!