

Keeping your shell connected to an agent - koukopoulos
http://kouk.surukle.me/2014/10/27/keeping-your-shell-connected-to-an-agent/

======
anon4
1\. Write a systemd service, name it e.g. mygpg.service and put it in
~/.config/systemd/user/mygpg.service

2\. systemctl --user --enable mygpg

3\. never write yet another race-prone startup script in your life

~~~
untothebreach
The author is a FreeBSD user[1], so doesn't have access to systemd.

1: [http://kouk.surukle.me/2013/11/06/my-linux-os-
history/](http://kouk.surukle.me/2013/11/06/my-linux-os-history/)

------
nyir
Cool, sounds a lot like
[https://wiki.gentoo.org/wiki/Keychain](https://wiki.gentoo.org/wiki/Keychain),
although probably a bit smaller.

------
beagle3
If you're using gpg for key management, is there any reason to ever use the
ssh-agent rather than the gpg-agent?

~~~
p4bl0
I was wondering the same thing, I use gpg-agent for both and it works
perfectly well for me, and it seems to be the same for the author of the
linked post.

------
r4um
I wrote this [https://github.com/r4um/ssh-authsock-
hack](https://github.com/r4um/ssh-authsock-hack) to tackle these kind of
problems.

Uses LD_PRELOAD functionality to dynamically set the SSH_AUTH_SOCK environment
variable.

