Bug 2181353
| Summary: | ssh-agent.service does not work on first access | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Florian Apolloner <florian> |
| Component: | openssh | Assignee: | Dmitry Belyavskiy <dbelyavs> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 42 | CC: | aodaki, crypto-team, dbelyavs, dwalsh, hegel666, hello, ian, jjelen, lkundrak, lslebodn, mattias.ellert, tm |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | Flags: | fedora-admin-xmlrpc:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | openssh-10.0p1-2.fc43 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-05-19 09:10:20 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Florian Apolloner
2023-03-23 19:55:05 UTC
Anthony Rabbito, you've provided the ssh-agent.socket file in rhbz#2125576 Do you have any comments? I see this as well. It applies just as well if run ssh on the command line and you have "AddKeysToAgent" set. The ssh-agent starts perfectly well. If you kill the client (say ^C to ssh) and then do it again, the second time it works fine because by then the agent has already started. A work around might be to just start ssh-agent as a reqular daemon instead of using socket activation. This message is a reminder that Fedora Linux 38 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '38'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 38 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21. Fedora Linux 38 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed. Florian, What is your proposal to resolve this issue& I don't think removing socket file is a good decision. I honestly think that the socket file should be removed. One cannot simply bolt systemd socket activation on a service that doesn't support socket activation. The only workable fix in the longrun that I can imagine is adding socket activation to ssh-agent (Iirc this has recently been done for sshd, so it might not be off-limits for ssh-agent). FYI ssh-agent socket activation will be supported in openssh v10: https://github.com/openssh/openssh-portable/commit/66e986880b2472fefaad781f10113b138b65ff27 This message is a reminder that Fedora Linux 40 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '40'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 40 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. Florian, Marcin - I just landed 10.0p1 into rawhide. Could you please test the behavior and provide necessary adjustments to ssh-agent.socket/ssh-agent.service if necessary? Hi Dmitry, I have upgraded to 10.0.p1 and adjust the service file as follows: ``` # Requires SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" # set in environment, handled for example in plasma via # /etc/xdg/plasma-workspace/env/ssh-agent.sh [Unit] ConditionEnvironment=!SSH_AGENT_PID Description=OpenSSH key agent Documentation=man:ssh-agent(1) man:ssh-add(1) man:ssh(1) Requires=ssh-agent.socket [Service] ExecStart=/usr/bin/ssh-agent -D PassEnvironment=SSH_AGENT_PID SuccessExitStatus=2 Type=simple [Install] Also=ssh-agent.socket ``` So essentially I removed `ExecStartPre`/`Environment` and `-a $SSH_AUTH_SOCK` from `ExecStart`. Seems to work fine. FEDORA-2025-7965866479 (openssh-10.0p1-2.fc43) has been submitted as an update to Fedora 43. https://bodhi.fedoraproject.org/updates/FEDORA-2025-7965866479 FEDORA-2025-7965866479 (openssh-10.0p1-2.fc43) has been pushed to the Fedora 43 stable repository. If problem still persists, please make note of it in this bug report. The version for the bug is set to 42 and resolution is ERRATA. But it was fixed just in 43. It would be nice either to really backport it to f42 or to fix bz fields. Either closed as RAWHIDE or to change version. Because it is not enough to ssh-agent.service due to missing commit https://github.com/openssh/openssh-portable/commit/66e986880b2472fefaad781f10113b138b65ff27 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days |