Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mysterious ssh-agent session

97 views
Skip to first unread message

Aidan Gauland

unread,
Apr 25, 2019, 1:00:04 AM4/25/19
to

While troubleshooting my ssh-agent setup, I discovered that an extra
ssh-agent instance was running, and I have no idea what is starting this.

What I want is to have ssh-agent run as a systemd user service
(following the instructions at
<https://wiki.archlinux.org/index.php?title=SSH_keys&oldid=571850#Start_ssh-agent_with_systemd_user>),
but the other instance is interfering.  Here is where it is in the
process tree (via htop):

 1756  ├─ /lib/systemd/systemd --user
31808  │  ├─ /usr/lib/flatpak/flatpak-session-helper
26143  │  ├─ /usr/lib/dconf/dconf-service
22233  │  ├─ /usr/bin/dunst
22204  │  ├─ /usr/lib/xdg-desktop-portal/xdg-desktop-portal-gtk
22187  │  ├─ /usr/lib/flatpak/xdg-permission-store
22184  │  ├─ /usr/lib/flatpak/xdg-document-portal
22180  │  ├─ /usr/lib/xdg-desktop-portal/xdg-desktop-portal
21243  │  ├─ /usr/bin/dirmngr --supervised
18747  │  ├─ /usr/lib/gvfs/gvfsd-trash [snip]
18672  │  ├─ /usr/lib/gvfs/gvfs-udisks2-volume-monitor
18534  │  ├─ /usr/lib/gvfs/gvfsd-metadata
 5759  │  ├─ /usr/bin/gpg-agent --supervised
 1934  │  ├─ /usr/lib/x86_64-linux-gnu/gconf/gconfd-2
 1856  │  ├─ /usr/lib/gvfs/gvfsd
 1849  │  ├─ /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
 1835  │  ├─ /usr/lib/at-spi2-core/at-spi-bus-launcher
 1847  │  │  └─ /usr/bin/dbus-daemon [snip]
 1790  │  ├─ /usr/bin/pulseaudio --start --log-target=syslog
 1932  │  │  └─ /usr/lib/x86_64-linux-gnu/pulse/gconf-helper
 1771  │  ├─ /usr/bin/dbus-daemon [snip]
 1762  │  ├─ /usr/bin/ssh-agent -t 2m -D -a /run/user/1000/ssh-agent.socket
 1761  │  ├─ /usr/bin/mpd --no-daemon
 1757  │  └─ (sd-pam)
 1763  │  │  └─ i3
 1876  │  │     ├─ /usr/bin/ssh-agent i3
 1833  │  │     ├─
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
 1832  │  │     └─ clipit

(The ssh-agent instance with PID 1762 is the one I want; PID 1876 is the
unwanted instance.)

I need to know how to either
  a) disable the instance started under "(sd-pam)", so I can use my
     systemd user service, or
  b) configure the instance started under "(sd-pam)", and use that
     instead of my system user service.

I am using lightdm to start X, and my session is the i3 WM.  In case
it's relevant, I also start
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 in my
~/.xsessionrc file.  I am running Debian 9.8 on x86_64.

Thanks,
Aidan Gauland

Reco

unread,
Apr 25, 2019, 2:40:03 AM4/25/19
to
Hi.

On Thu, Apr 25, 2019 at 04:58:28PM +1200, Aidan Gauland wrote:
> I need to know how to either
> a) disable the instance started under "(sd-pam)", so I can use my
> systemd user service, or

Comment out use-ssh-agent in /etc/X11/Xsession.options .


> b) configure the instance started under "(sd-pam)", and use that
> instead of my system user service.

Modify /etc/X11/Xsession.d/90x11-common_ssh-agent , SSHAGENTARGS in
particular.

Reco

Aidan Gauland

unread,
Apr 28, 2019, 6:30:04 AM4/28/19
to
On 25/04/19 6:37 PM, Reco wrote:
> Hi.
>
> On Thu, Apr 25, 2019 at 04:58:28PM +1200, Aidan Gauland wrote:
>> I need to know how to either
>> a) disable the instance started under "(sd-pam)", so I can use my
>> systemd user service, or
> Comment out use-ssh-agent in /etc/X11/Xsession.options .

Ah ha!  That's where it was.  Thanks!

>> b) configure the instance started under "(sd-pam)", and use that
>> instead of my system user service.
> Modify /etc/X11/Xsession.d/90x11-common_ssh-agent , SSHAGENTARGS in
> particular.
I will probably go with option a), but is there a way to option b) per-user?

Reco

unread,
Apr 28, 2019, 7:40:04 AM4/28/19
to
Hi.

On Sun, Apr 28, 2019 at 10:10:14PM +1200, Aidan Gauland wrote:
> On 25/04/19 6:37 PM, Reco wrote:
> > Hi.
> >
> > On Thu, Apr 25, 2019 at 04:58:28PM +1200, Aidan Gauland wrote:
> >> I need to know how to either
> >> a) disable the instance started under "(sd-pam)", so I can use my
> >> systemd user service, or
> > Comment out use-ssh-agent in /etc/X11/Xsession.options .
>
> Ah ha!  That's where it was.  Thanks!

You're welcome.


> >> b) configure the instance started under "(sd-pam)", and use that
> >> instead of my system user service.
> > Modify /etc/X11/Xsession.d/90x11-common_ssh-agent , SSHAGENTARGS in
> > particular.
> I will probably go with option a), but is there a way to option b) per-user?

Not without some hackery involving $USER, $HOME and friends.
Such customization are easier with per-user system services IMO.

Reco
0 new messages