This is a wrapper shell script around
pinentry that selects which pinentry program to call depending on the context (local or ssh).
- Shell 100%
| .gitignore | ||
| pinentry-auto | ||
| README.md | ||
Abstract
This is a wrapper shell script around pinentry that selects which pinentry program to call depending on the context.
In case a connection is detected as coming from SSH pinentry-curses is selected no matter what.
If not, then the script will select an appropriate frontend.
Currently the only frontend used is /usr/bin/pinentry but in the future a configuration file and an auto selection
will be implemented
Setup
Installation
Copy pinentry-auto to '/usr/local/bin/pinentry-auto':
# On Debian
install -m 755 -o root -g root ./pinentry-auto /usr/local/bin/pinentry-auto
Configuration
In your session init file (e.g. .bashrc, .zshrc, .profile, or any other appropriate file) ensure the following is set
export GPG_TTY="$(tty)"
export PINENTRY_USER_DATA="connect/greeter"
{ [ -n "${SSH_CLIENT}" ] || [ -n "${SSH_CONNECTION}" ] || [ -n "${SSH_TTY}" ]; } && export PINENTRY_USER_DATA="connect/ssh"
Then create or edit the file "${HOME}/.gnupg/gpg-agent.conf so that it include this entry (only one pinentry-program
line should exist):
pinentry-program /usr/local/bin/pinentry-auto