SUMMARY Under wayland, ssh-agent is not started automatically on startup. This works on X11. Potential solutions: - Fedora added a patch to openssh-client to create a systemd service: https://bugzilla.redhat.com/show_bug.cgi?id=1761817 - some startup scripts: https://forum.kde.org/viewtopic.php?f=309&t=153769 Older discussion: https://bugs.kde.org/show_bug.cgi?id=380311 https://bugs.kde.org/show_bug.cgi?id=44177 STEPS TO REPRODUCE 1. Start a wayland session 2. notice that $SSH_AUTH_SOCK is not set OBSERVED RESULT ssh-agent needs to be started manually. EXPECTED RESULT ssh-agent is running on startup by default without user interaction.
Works fine for me on Fedora 34 with a git master Plasma Wayland session when starting an ssh-agent via the following autostart script: #!/bin/sh eval "$(ssh-agent)" ssh-add -q < /dev/null How are you doing it?
That is exactly the point. I should not have to start the ssh-agent manually. It should be started automatically without a script created by a user. This is how it works with X11. "xinit handles launching ssh-agent for plasma" - https://bugzilla.redhat.com/show_bug.cgi?id=1761817
Heh I had no idea that you could do it in any other way. According to https://src.fedoraproject.org/rpms/openssh/c/5f230a4, the service is called "ssh-agent". What does `systemctl status ssh-agent` say?
Created attachment 139325 [details] ssh-agent_process_tree
The ssh-agent systemd service is not present on my system (not on X11 and not on wayland). I use KDE neon. I only added the redhat links as potential solution for the problem. The attached screenshot shows that ssh-agent is started by startplasma-x11 on my system, the same is not true on wayland: startplasma-wayland does not start ssh-agent.
Hmm, it kind of seems to me like this is something that should be done at the distro level or even the openssh level. Otherwise we're unilaterally creating a systemd service for something that's not ours. It would conflict with what Fedora's doing, and would conflict with what the openSSH people would do should it be doe at that level.