GPG doesn't show password dialog via SSH

GPG doesn't show password dialog via SSH

If logged in into a SSH server with a running desktop, the GPG tool doesn’t show any password dialog when trying to decrypt a file in an SSH session. It just stalls at gpg: AES encrypted data.

User grawity shows a solution on superuser.com where the PIN-Entry tool of the GPG agent can be set manually. My adaption now looks like this and works like a charm:

File: ~/.gnupg/gpg-agent.conf

pinentry-program /usr/bin/pinentry-curses

Reload the GPG agent configuration with the following command and you’re done:

gpg-connect-agent reloadagent /bye