Hi Antoine-- On Thu 2025-05-08 00:50:44 +0200, Antoine Le Gonidec wrote: >> Can you share the output of the following command (run as your normal >> user): >> >> systemctl --user cat ssh-agent.socket ssh-agent.service > > I get the exact same output as yours, no local overrides here.
great, thanks for confirming. >> If your output looks the same as above, can you share the output of: >> >> systemctl --user status ssh-agent.socket ssh-agent.service >> >> That would let me see what your local process supervisor believes is >> going on with this service. > > ○ ssh-agent.socket - OpenSSH Agent socket > Loaded: loaded (/usr/lib/systemd/user/ssh-agent.socket; enabled; preset: > enabled) Active: inactive (dead) > Triggers: ● ssh-agent.service > Docs: man:ssh-agent(1) > Listen: /run/user/1000/openssh_agent (Stream) > > × ssh-agent.service - OpenSSH Agent > Loaded: loaded (/usr/lib/systemd/user/ssh-agent.service; static) > Active: failed (Result: exit-code) since Fri 2025-04-18 16:26:54 CEST; 2 > weeks 5 days ago Duration: 18min 13.762s > Invocation: 9e8c3dc015d64454810ba837d4433547 > TriggeredBy: ○ ssh-agent.socket > Docs: man:ssh-agent(1) > Main PID: 3932465 (code=exited, status=2) > Mem peak: 1.9M > CPU: 24ms OK, this is just telling me that you aren't using the systemd unit any more, right? >> How are you restarting the ssh-agent user service? > > I used to restart it with: > systemctl --user restart ssh-agent.service Under what circumstances would you need to do this? I'm not saying it's wrong (it should be fine!), i'm just trying to replicate the circumstances you found yourself in. side note: with stock openssh, asking systemctl to restart ssh-agent will produce a warning in the logs because ssh-agent will terminate with a non-zero error code when asked to stop by systemd. This isn't actually a problem, but it looks scary in the journal. I've asked upstream to clean this up: https://github.com/openssh/openssh-portable/pull/565 I don't think it will have any effect on what you're seeing, though. > But since I got bitten by the behaviour I reported, I stopped using the > systemd > unit and now start the agent directly from my user ~/.profile: > > # Start SSH agent > export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/openssh_agent" > if [ ! -e "$SSH_AUTH_SOCK" ]; then > ssh-agent -a "$SSH_AUTH_SOCK" >/dev/null > fi > > For debugging purposes, I can disable that temporarily and get back to the > systemd unit, maybe try to get more debug output from it. Yes, please do try to disable that and see what you can replicate. that would be great! I'm unable to trigger the problem you described directly myself with the information we have so far. --dkg
signature.asc
Description: PGP signature