Just in case anyone is interested, I wrote a simple pinentry-emacs script, that uses emacsclient to ask inside emacs for the password. Probably not secure, but I'm the only one accessing this host. https://github.com/ecraven/pinentry-emacs Finally things seem to work reliably :) Greetings, Peter