can't export SSH key under certain conditions

Marcos Alano marcoshalano at
Sun Jul 24 03:50:23 CEST 2016

Hello everybody,

I'm had a problem which I cn fix but all this seems an unexpected behavior.
I had this public key (created just for tests):
marcos at marcos-laptop:~$ gpg2 --list-keys D27D8884
pub   rsa2048/D27D8884 2016-07-23 [CA]
uid         [ultimate] Marcos (teste do ssh) <marcos2 at>

As you can see this key is present, trusted and have authentication
The problem occurs when I tried to export the SSH key:
marcos at marcos-laptop:~$ gpg2 --export-ssh-key D27D8884
gpg: key "D27D8884" not found: Unusable public key
gpg: export as ssh key failed: Unusable public key

After some research I could solve the problem: To export the SSH key
correctly I needed a *subkey* with authentication capability enabled.

The question is: Shouldn't the main key with authentication capability work
well? This is a expected behavior or should I report this as a bug?

Best regards.

Marcos H. Alano

Sent from my Android
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20160724/5bc3e062/attachment.html>

More information about the Gnupg-users mailing list