gpg 2.1 gpg-agent over ssh

Ximin Luo infinity0 at
Fri Mar 27 11:38:36 CET 2015

When running gpg 2.1.2 over SSH with a secret-key operation, the gpg in the ssh client appears to hang.

What is actually happening is that the gpg-agent it's connecting to, is running a pinentry that's associated with the display on the desktop session the *gpg-agent* is attached to, rather than the ssh client, and there's no way for the ssh user to reach this.

$ pgrep -a gpg-agent
17902 gpg-agent --homedir /home/infinity0/.gnupg --use-standard-socket --daemon
$ kill -HUP 17902 # flush all secret keys
$ pgrep -af pinentry
(exit 1)

$ gpg2 -as <<EOF

gpg: signal Interrupt caught ... exiting

(exit 130)
(exit 130)
$ pgrep -af pinentry
# this process sticks around and you need to kill it manually

But physically going back to the desktop session doesn't show a pinentry popup, for some reason.

It's unclear the best way to solve this. Thoughts?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20150327/e1574557/attachment-0001.sig>

More information about the Gnupg-devel mailing list