You are not logged in.
So I recently switched from initscripts to systemd. Now when I use SSH, gpg-agent tries to save my passwords, but I can't figure out how it got started.
It's definitely running, started by systemd (or at least, orphaned such that it is parented on systemd):
$ ps aux | grep gpg-agent
aogier 405 0.0 0.1 5436 1352 ? Ss 07:30 0:00 /usr/bin/gpg-agent --sh --daemon --enable-ssh-support --write-env-file /home/aogier/.cache/gpg-agent-info
$ pstree
systemd─┬─...
├─gpg-agent───scdaemon
├─...
But I can't find out why systemd feels the need to start it, the following all turn up empty:
$ systemctl list-units --all | grep gpg
$ systemctl list-unit-files --all | grep gpg
$ grep gpg -r /etc/systemd
$ grep gpg -r /usr/lib/systemd
My guess is something is starting gpg-agent and orphaning it, but why it's started in daemon mode with ssh support is beyond me. It gets in the way of my ssh-agent usage, and it disturbs me (a week ago I removed a SSH private key from my computer, only to find today that I could still authenticate using it because gnupg held onto it -- ick).
Anyone know what the problem could be? Maybe XFCE or LXDM?
Offline
It's disturbing systemd knows 'what's good for you', but gpg-agent SSH emulation is seriously broken, keys get corrupted, new keys fail to get added etc. I'm trying to get it fixed since 2010 without any progress https://bugs.g10code.com/gnupg/issue1293i
You need to install an RTFM interface.
Offline
So I recently switched from initscripts to systemd. Now when I use SSH, gpg-agent tries to save my passwords, but I can't figure out how it got started.
It's definitely running, started by systemd (or at least, orphaned such that it is parented on systemd):
$ ps aux | grep gpg-agent aogier 405 0.0 0.1 5436 1352 ? Ss 07:30 0:00 /usr/bin/gpg-agent --sh --daemon --enable-ssh-support --write-env-file /home/aogier/.cache/gpg-agent-info $ pstree systemd─┬─... ├─gpg-agent───scdaemon ├─...
But I can't find out why systemd feels the need to start it, the following all turn up empty:
$ systemctl list-units --all | grep gpg $ systemctl list-unit-files --all | grep gpg $ grep gpg -r /etc/systemd $ grep gpg -r /usr/lib/systemd
My guess is something is starting gpg-agent and orphaning it, but why it's started in daemon mode with ssh support is beyond me. It gets in the way of my ssh-agent usage, and it disturbs me (a week ago I removed a SSH private key from my computer, only to find today that I could still authenticate using it because gnupg held onto it -- ick).
Anyone know what the problem could be? Maybe XFCE or LXDM?
Have you check if it's not started in /etc/profile.d/ ?
Offline
It's more likely that something such as gnome-keyring-daemon is starting this for you. gpg-agent is completely evil, and yes, it double forks on startup (so regardless of what starts it, it will always end up reparented to PID 1). systemd isn't involved here. you might want to change your post title.
Offline
I was wondering what starts the gpg-agent too and found that in my case it's XFCE. See the XFCE docs. It also states how to disable this "feature".
Offline