I'm using gnupg with tty pinentry agent to encrypt a file with a symmetric passphrase. When I'm typing it, both to encrypt and decrypt the file, gnupg's tty pinentry avoid displaying the characters I'm entering to avoid it getting stolen by someone watching my screen while I'm typing. It also avoids displaying an asterisk so that my passphrase length can't be stolen as well.

However, suppose I'm aware of the risk and I want to view an asterisk every time I type a character in, allowing me to know if my input was received or if I failed to press the key, or if I accidentally pressed a neighbouring one as well, allowing me to understand when a backspace get correctly received as well (by deleting an asterisk each time I press it).

Suppose I even want to see the character I'm typing echoed, to know if I'm mistyping some, for how inadvisable that may be.

How do I achieve those two things?

  • 1
    What I usually do in such cases(extremely difficult password ), I open any text editor, type password there, then copy/paste to gpg/ssh and other such program. Just don't save and close immediately that editor after password pasted
    – Alex
    Jan 15, 2017 at 5:35
  • I'd recommend making this an answer as the only other feasible way is re-compiling gpg2 itself to allow this. Dec 28, 2018 at 2:12

1 Answer 1


This is not supported by pinentry-tty.

pinentry-curses does echo asterisks; switching to that may be your solution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .