Hello, Thanks for your testing again.
I think that your ssh invocation is the first trigger to invoke gpg-agent (by systemd). Does SSH work successfully, when gpg-agent is invoked by gpg, by running something like "gpg --card-status" before running ssh? If SSH works after "gpg --card-status", this is another way of workaround. Norbert Preining <norb...@preining.info> wrote: >> It may happen when gpg-agent doesn't know DBUS_SESSION_BUSS_ADDRESS. > > See above, at least in my shell it is set. > >> > then I switched to pinentry-gtk-2, same > > confirmed again. > >> It may happen when gpg-agent doesn't know DISPLAY or XAUTHORITY. > > both are set in my env. Sorry for confusion. I meant environment variables in the process of gpg-agent. You can check by: $ gpg-connect-agent "getinfo std_startup_env" /bye In my case, the output is like: ========================== D TERM=xterm-256color D DISPLAY=:0.0 D XAUTHORITY=/home/gniibe/.Xauthority D DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus OK ========================== The updatestartuptty sub-command is to update those variables from your shell to gpg-agent running background. The failure is gpg-agent cannot run pinentry correctly for some reason(s). You can test if pinentry itself works in your environment. Here is my example session, where "-->" stands for my input and "#" is comment. ========================== --> $ pinentry-gnome3 OK Pleased to meet you --> getpin # a dialog window pops up, I enter "hello" D hello OK --> bye OK closing connection ========================== --