I have the OPEN PGP SMARTCARD V2.1 and there I have a signature key, a encryption key and a authentication key stored. The last 8 digits of the signature key is for example: 1234 5678. Now I want to copy these keys to my Yubikey Neo for backup purpose. I was trying this:

  1. Plug in Smartcard and remove Yubikey
  2. gpg -a -o seckey.asc --export-secret-key 12456789
  3. Plug in Yubikey and remove Smartcard
  4. gpg --edit-key 12456789 - here I get: "Secret key is available" and my keys are listed
  5. toggle then:

    gpg> keytocard Really move the primary key? (y/N) y Please select where to store the key: (1) Signature key (3) Authentication key Your selection? 1 gpg: KEYTOCARD failed: Unusable secret key

1 Answer 1


Secret keys cannot be exported from OpenPGP smart cards -- that's the very idea behind them. If you created the key on a computer and imported it to the smart card, use the backup to copy it to the Yubikey.

Otherwise, you'll have to create a new key. Be aware the Yubikey is just another OpenPGP smart card, so if you create the key directly on the Yubikey, you will not be able to export it, again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .