SSH and gpg2: pinentry errors hidden from view, agent refused operation

Ingo Klöcker kloecker at
Thu Dec 30 16:44:10 CET 2021

On Donnerstag, 30. Dezember 2021 15:38:47 CET Lars Noodén via Gnupg-users 
> What else is needed to get pinentry invoked so that the SSH client can
> connect using the GnuPG RSA key?
> At this point the public key is visible in the SSH agent:
>   $ ssh-add -l
>   3072 SHA256:j0V4cVzC...NKQPA (none) (RSA)
> and the public key has been saved in the default file:
>   $ssh-add -L > ~/.ssh/id_rsa

The file ~/.ssh/id_rsa usually contains the secret key. The corresponding 
public key is usually in the file called ~/.ssh/ I'm not sure 
whether this confuses ssh. Maybe it tries to interpret your public key as 
secret key.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the Gnupg-users mailing list