Cannot export SSH public key

Felix E. Klee felix.klee at inka.de
Mon Nov 20 09:24:32 CET 2023


I added an authentication key to my existing key <yubikey at f76.eu>.

    $ gpg --edit-key --expert yubikey at f76.eu
    > addkey

I selected:

    8: RSA (set your own capabilities)
    S: disable sign capability
    E: disable encrypt capability
    A: enable authenticate capability
    4096: key size
    0: expiry (never)

However, I cannot export it for SSH:

    $ gpg --list-keys --keyid-format SHORT yubikey at f76.eu
    pub   rsa4096/1B6ED589 2023-06-29 [SC]
          7A0FE73DDB744F0F97341DA71BE349D11B6ED589
    uid         [ultimate] Felix E. Klee (YubiKey) <yubikey at f76.eu>
    sub   rsa4096/D2E31736 2023-06-29 [E]
    sub   rsa4096/FBA5B1E5 2023-11-20 [A]

    $ gpg --export-ssh-key FBA5B1E5
    gpg: key "FBA5B1E5" not found: Unusable public key
    gpg: export as ssh key failed: Unusable public key

GnuPG version:

    $ gpg --version
    gpg (GnuPG) 2.2.27
    libgcrypt 1.9.4
    Copyright (C) 2021 Free Software Foundation, Inc.
    License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    Home: /home/felix/.gnupg
    Supported algorithms:
    Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
    Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
            CAMELLIA128, CAMELLIA192, CAMELLIA256
    Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
    Compression: Uncompressed, ZIP, ZLIB, BZIP2

What’s wrong here?



More information about the Gnupg-users mailing list