Bug#1103522: openssh-client: ssh-agent socket created in an unpredictable path

Antoine Le Gonidec <[email protected]>
Newsgroups gmane.linux.debian.devel.ssh
Message-ID <20250509003530.165ec078__18.5473518044432$1746743968$gmane$org@hal9000.dotslashplay.it>
> We can do this with the following patch to the OpenSSH package's
> ssh-agent.service file:
> 
> diff --git a/debian/systemd/ssh-agent.service
> b/debian/systemd/ssh-agent.service index 72e0a3e46..19ea47c91 100644
> --- a/debian/systemd/ssh-agent.service
> +++ b/debian/systemd/ssh-agent.service
> @@ -1,6 +1,8 @@
>  [Unit]
>  Description=OpenSSH Agent
>  Documentation=man:ssh-agent(1)
> +Requires=ssh-agent.socket
> +After=ssh-agent.socket
>  
>  [Service]
>  Environment=SSH_ASKPASS_REQUIRE=force
> 
> 
> You can test this if you like by dropping a file with this contents into
> ~/.config/systemd/user/ssh-agent.service.d/override.conf :
> 
> ```
> # Added while debugging https://bugs.debian.org/1103522
> [Unit]
> Requires=ssh-agent.socket
> After=ssh-agent.socket
> ```
> 
> Then do:
> 
>     systemctl --user daemon-reload
>     systemctl --user restart ssh-agent.service
> 
> And you should see that the socket is up and the agent is listening on
> the appropriate socket.

Well spotted, this does indeed fix the behaviour I was experiencing!
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQSUsdxM90hewW6X7Jhja3j5HOuA2AUCaB0xsgAKCRBja3j5HOuA
2BQzAQDu486j1mTOanccDbgJGyj/bXsKktFz9MRfjjddLfdfhwEAmIrioEPhTsE9
2MR1/sqMXjqxFyfVMGZLIpT+0+SOBQg=
=n2zr
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.