recover ssh-agent socket
Daniel Shahaf
d.s at daniel.shahaf.name
Sun Jan 9 08:10:13 IST 2022
Tzafrir Cohen wrote on Sat, 08 Jan 2022 09:06 +00:00:
> I accidentally deleted my ssh-agent's socket from /tmp. The agent is
> still running and I have $SSH_AGENT_PID and $SSH_AUTH_SOCK set in
> various processes, so I know where it should have been.
>
> Is there any way to recover the socket? Short of restarting the X
> session, of course.
Could you just spawn a new ssh-agent instance and have it use
$SSH_AUTO_SOCK as the name of the socket, and re-add private keys to it?
$SSH_AGENT_PID would still point at the old instance, sure, but what
would that break?
More information about the Linux-il
mailing list