First ssh-agent request fails on WSL with systemd socket-activation
0
votes
2
answers
332
views
Running Fedora on WSL2, I find that the socket activation on
ssh-agent
doesn't quite work properly: the first request that triggers the actual service starting fails. This may be a git fetch
or git pull
request, or else an ssh-add
call. This shows up as a long timeout on the client call rather than as an immediate failure.
Because the systemd config contains both ssh-agent.socket
*and* ssh-agent.service
, attempting to disable ssh-agent.socket
and enable ssh-agent.service
directly doesn't work, as it just turns the socket activation back on rather than configuring the service to start automatically:
~$ systemctl --user is-enabled ssh-agent.socket
enabled
~$ systemctl --user is-enabled ssh-agent.service
indirect
~$ systemctl --user enable ssh-agent.service
~$ systemctl --user is-enabled ssh-agent.service
indirect
~$ systemctl --user disable ssh-agent.socket
Removed "/home/acoghlan/.config/systemd/user/sockets.target.wants/ssh-agent.socket".
~$ systemctl --user enable ssh-agent.service
Created symlink /home/acoghlan/.config/systemd/user/sockets.target.wants/ssh-agent.socket → /usr/lib/systemd/user/ssh-agent.socket.
Asked by ncoghlan
(1071 rep)
Aug 29, 2024, 04:24 AM
Last activity: Aug 29, 2024, 06:58 AM
Last activity: Aug 29, 2024, 06:58 AM