TransWikia.com

How to use gnupg remotely on buster while also logged into the local GUI

Unix & Linux Asked by plugwash on January 20, 2021

I have a Debian buster system where I am logged in to the local GUI and also logged in over ssh. I need to sign something with gnupg over ssh.

Unfortunately I get no prompt for a passphrase on my ssh session, I suspect the prompt is being shown graphically in the GUI, but since I’m not in front of the machine right now I can’t check.

In the past I have achived this through killing the gpg agent and starting one manually, but that doesn’t seem to work anymore. The agent tells me it is already running. From some searching it seems that a systemd user service may be responsible for this.

One Answer

I was able to work around this issue by creating a symlink to my gnupg home directory with.

ln -s .gnupg .gnupg_

I was then able to start a gpg agent manually in the symlinked gnupg home with

GNUPGHOME=.gnupg_ gpg-agent --pinentry-program pinentry-curses --daemon bash

And within that session I was able to use gpg commands and succesfully get a passphrase prompt.

Answered by plugwash on January 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP