Whenever I try to use gpg from a console-based environment such as ssh sessions it fails because the GTK pinentry dialog cannot be shown in a SSH session.
unset DISPLAY but it does not help and it does look like a dirty solution anyway. The GPG command line options do not include a switch for forcing the pinentry to console-mode.
Older GPG versions offered a text-based prompt that worked fine in SSH sessions but after the upgrade it just fails.
There is the
--textmode command line switch but it does not seem to work and apparently is meant to do something else which is even more misleading.
What would be the proper and clean way of getting plain-text pin entry for remote sessions?