Sample Header Ad - 728x90

ssh agent forwarding - what's going on under the hood?

0 votes
2 answers
140 views
When I ask Google how ssh agent forwarding works it gives me lots of links to SEO optimized rubbish explaining how to provision ssh-agent. That is NOT what I am asking. I currently have an issue where jobs started in a screen session on the far side of a VPN connection fail because they can't connect out via ssh after the VPN fails. Normally these jobs rely on agent forwarding from the origin client to connect. I have suspicions about what is going wrong here, but a better understanding of the whole agent forwarding would help here. When I connect from host0 to hosta, the ssh-agent on host0 provides my private key to the ssh client on host0. On hosta I see SSH_AUTH_SOCK populated referencing a local socket. If, on hosta I then ssh hostb, the ssh client somehow connects to ssh-agent on host0. presumably that is using an alternate channel in the host0-hosta ssh connection. what is happenning at $SSH_AUTH_SOCK on hosta? (fuser $SSH_AUTH_SOCK suggests that nothing has that open) In the case of my screen session, if the ssh session which started the screen session has ended, and I start a new ssh session from host0 to hosta, will the key requests from the screen session be sent over the new connection?
Asked by symcbean (6301 rep)
Jan 15, 2025, 04:58 PM
Last activity: Jan 20, 2025, 04:05 PM