25.10 (GNOME 49) changed name of ssh-agent socket?

Just reporting my observation: My ssh reported it was not connecting to the ssh-agent. I discovered that the socket is now $XDG_RUNTIME_DIR/openssh_agent instead of $XDG_RUNTIME_DIR/ssh-agent.socket. I changed the SSH_AUTH_SOCK setting in my .profile to fix.

2 Likes

Is this a GNOME desktop?
Is the package gcr4 installed? And is the gcr-ssh-agent.socket systemd unit active?

desktop is GNOME

nautilus$ apt search gcr4$
gcr4/questing,now 4.4.0.1-7 amd64 [installed,automatic]
  GNOME crypto services (daemon and tools)

nautilus$ systemctl --user status gcr-ssh-agent.service
â—Ź gcr-ssh-agent.service - GCR ssh-agent wrapper
     Loaded: loaded (/usr/lib/systemd/user/gcr-ssh-agent.service; enabled; pres>
     Active: active (running) since Sun 2025-10-12 15:04:17 PDT; 1 week 0 days >
 Invocation: 3c8b3a2e461a4c5eb4820106dd9d3ef4
TriggeredBy: â—Ź gcr-ssh-agent.socket
   Main PID: 3664 (gcr-ssh-agent)
      Tasks: 3 (limit: 17979)
     Memory: 900K (peak: 1.5M)
        CPU: 7ms
     CGroup: /user.slice/user-1001.slice/user@1001.service/app.slice/gcr-ssh-ag>
             └─3664 /usr/libexec/gcr-ssh-agent --base-dir /run/user/1001/gcr
  ...
nautilus$ ls ${XDG_RUNTIME_DIR}/*ssh*
/run/user/1001/openssh_agent=

Saw this also

nautilus$ ls ${XDG_RUNTIME_DIR}/gcr/
ssh=

Ok, those are the expected defaults.
In that case, you don’t need to specify SSH_AUTH_SOCK in a .profile script.
SSH_AUTH_SOCK will already be set to $XDG_RUNTIME_DIR/gcr/ssh by systemd in your desktop environment, which is the GNOME ssh agent storing your passwords in the GNOME keyring/secrets service.

On the other hand, if you also want to access an ssh-agent from a non-desktop session, then manually setting $XDG_RUNTIME_DIR/openssh_agent is OK. In this case it is the openssh agent rather than GNOME’s agent.

OK. I will do that. Thanks for the info.

So, GNOME is starting gcr-ssh-agent. What is starting ssh-agent? I have nothing in .profile or .bashrc doing that, and there are no ssh entries in ~/.config/systemd/user.

P.S. I do have a headless box where I have set up ~/.config/systemd/user/ssh-agent.service.

The /etc/systemd/user/sockets.target.wants/ssh-agent.socket symlink makes ssh-agent.socket autostart.

1 Like

This also seems to affect Kubuntu 25.10 where I have to add an export for SSH_AUTH_SOCK to my .bashrc. Where is $XDG_RUNTIME_DIR/openssh_agent being set and can I disable or change it?