Multiple conflicting SSH agents and SSH_AUTH_SOCK not set after upgrade to noble

Bug #2061288 reported by jon richter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-keyring (Ubuntu)
New
Undecided
Unassigned

Bug Description

After upgrading mantic to noble, there are multiple SSH agents who are independently trying to set SSH_AUTH_SOCK, none of which is successful.

1. ~/.config/autostart/gnome-keyring-ssh.desktop (identical to /etc/xdg/autostart/gnome-keyring-ssh.desktop, if not modified)

This will start the regular GNOME Keyring SSH Agent. It will set the Agent location to /run/user/1000/ssh, while the Socket is initialised at /run/user/1000/.ssh

2. If that one is not running, the user unit ssh-agent.service kicks in.

It sets the Socket to live at /run/user/1000/openssh_agent

3. Parallely, there is also a GPG agent emulating SSH support gpg-agent-ssh.socket

Socket at /run/user/1000/gnupg/S.gpg-agent.ssh

4. There is also the (new?) user unit gcr-ssh-agent.socket

It sets its Socket to live at /run/user/1000/gcr/ssh

---

The last one seems to be preferred by GNOME upstream nowadays, but also comes with caveats, as its unit does not set the SSH_AUTH_SOCK variable. This commit from !137 (see below) does not seem to be included in /usr/lib/systemd/user/gcr-ssh-agent.socket

- https://gitlab.gnome.org/GNOME/gcr/-/commit/b12cc639949c4b548d84625b292a2aff1faaf195

Apparently it's solved upstream with the gcr 4.2.1 release. Installed is 4.2.0-4build1

There are discussions about how this is possibly resolved in

- https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/770 closed
- https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/2623 open
- https://gitlab.gnome.org/GNOME/gcr/-/issues/55 closed
- https://gitlab.gnome.org/GNOME/gcr/-/merge_requests/137 merged
- https://gitlab.gnome.org/GNOME/gcr/-/merge_requests/138 closed
- https://gitlab.gnome.org/GNOME/gcr/-/merge_requests/139 reverts 137

Similar regressions around GCR (What does that abbreviation even mean? It's not explained in the readme) are described in the following, including other possible workarounds:

- https://www.adamsdesk.com/posts/fix-gnome-keyring-ssh-auth-sock/
- https://bbs.archlinux.org/viewtopic.php?id=292403

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.