Re: *Now* what is starting ssh-agent?
On Tue, Jul 26, 2022 at 03:40:48PM -0300, Chris Mitchell wrote:
> Here's my service file:
>
> $ cat /etc/systemd/user/ssh-agent.service
According to systemd.unit(5) this directory is for "User units created
by the administrator".
> Here's what I know so far:
>
> $ env | grep -i ssh
> SSH_AUTH_SOCK=/tmp/ssh-XXXXXXZAaNOY/agent.3010
> SSH_AGENT_PID=3011
>
> $ ps ax | grep 3011
> 3011 ? Ss 0:00 /usr/bin/ssh-agent -s
>
> $ pstree -ps 3011
> systemd(1)───ssh-agent(3011)
PID 1 is the system instance of systemd. Not a user instance.
The ssh-agent with PID 3011 is being started by the system instance, so
it is a system unit. It's not your locally defined user unit.
Things you should look at next, I suppose:
systemctl status ssh-agent
systemctl --user status ssh-agent
Starting an ssh-agent via systemd is completely outside of my experience,
though, and I don't really understand why you'd attempt it. It's not
clear to me *at all* how you would communicate the environment variables
from the ssh-agent invocation over to the user's login session.
Reply to: