<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>rail - security</title>
      <link>https://flufftech.net</link>
      <description>enby fox on the internet :3</description>
      <generator>Zola</generator>
      <language>en</language>
      <atom:link href="https://flufftech.net/tag/security/rss.xml" rel="self" type="application/rss+xml"/>
      <lastBuildDate>Fri, 24 Jul 2026 00:00:00 +0000</lastBuildDate>
      <item>
          <title>Configuring Token2 security key for PGP and SSH</title>
          <pubDate>Fri, 24 Jul 2026 00:00:00 +0000</pubDate>
          <author>rail</author>
          <link>https://flufftech.net/posts/configuring-security-key-for-pgp-and-ssh/</link>
          <guid>https://flufftech.net/posts/configuring-security-key-for-pgp-and-ssh/</guid>
          <description xml:base="https://flufftech.net/posts/configuring-security-key-for-pgp-and-ssh/">&lt;div class=&quot;side-note&quot;&gt;
    &lt;strong&gt;Note:&lt;&#x2F;strong&gt;&amp;nbsp;I’m not an expert in cryptography and while I believe this blog post shouldn’t contain any gross factual errors, I do not give you any warranty that described procedure is secure. Please do your own research for real-life security-sensitive situations.
&lt;&#x2F;div&gt;
&lt;p&gt;A while ago I bought myself a pair of Token2 FIDO2 security keys – honestly I can recommend them, they’re great. They offer most of the same functionality as YubiKeys while being less than half the price, it’s really awesome.&lt;&#x2F;p&gt;
&lt;p&gt;For all that time though I’ve been massively underutilizing my keys, only setting them up for hardware-based 2FA and occasional passwordless login on those few services that allow it.&lt;&#x2F;p&gt;
&lt;p&gt;Not a long time ago I set up my own email server and started using new email addresses for different services, which prompted me to reconsider my use of PGP keys. This is where the idea was born to look at the on-device cryptography features of my Token2 keys.&lt;&#x2F;p&gt;
&lt;p&gt;Take a fair warning, this is going to be a long, comprehensive read about a lot of things you can do with PGP on your hardware token ^^&lt;&#x2F;p&gt;
&lt;!-- toc --&gt;
&lt;h2 id=&quot;the-basics&quot;&gt;The Basics&lt;&#x2F;h2&gt;
&lt;p&gt;Version of the key that I own (Token2 PIN+ Release3.3 USB-C) supports several OpenPGP algorithms including RSA4096 and ed25519, various embedded cryptographic algorithms and ecdsa-sk &amp;amp; ed25519-sk SSH keys. Support may vary depending on exact hardware revision and product type but in general, it should be more or less the same with any modern Token2 key.&lt;&#x2F;p&gt;
&lt;p&gt;In practical terms it basically means that in addition to FIDO2 functionalities, that Token2 key is also a PGP smart-card which is a solid basis for achieving two goals:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Storing my PGP keys on the token itself&lt;&#x2F;strong&gt; so I can always have them with me on the go regardless of what device I use; and&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Using my token for SSH pubkey authentication&lt;&#x2F;strong&gt; for waow ultra secure remote access to very important things. I’ll be honest here, this is pretty overkill and in most situations this kind of setup will probably just end up getting in the way but I did it anyway just to have fun with it.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;using-gpg-to-configure-your-keys&quot;&gt;Using GPG to configure your keys&lt;&#x2F;h2&gt;
&lt;p&gt;The tool I used for setting up everything on my token was the &lt;code&gt;gpg&lt;&#x2F;code&gt; binary from GnuPG suite and the embedded command-line interface.&lt;&#x2F;p&gt;
&lt;p&gt;Technically most of the same things can be done with standard OpenPGP and CCID combo but that approach felt more wonky and less out-of-the-box for me so I decided not to use it.&lt;&#x2F;p&gt;
&lt;p&gt;Usage of GPG for setting up a smartcard doesn’t seem to be documented very well and there are some things that are just left for you to figure out so I will try to do my best of describing the process here.&lt;&#x2F;p&gt;
&lt;p&gt;Let’s begin with reading some information about our token with the following command:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ gpg --card-status&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Reader ...........: 0000:0000:X:0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Application ID ...: 00000000000000000000000000000000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Application type .: OpenPGP&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Version ..........: 3.4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Manufacturer .....: Token2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Serial number ....: 00000000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Name of cardholder: [not set]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Language prefs ...: [not set]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Salutation .......:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;URL of public key : [not set]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Login data .......: [not set]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Signature PIN ....: forced&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Key attributes ...: rsa2048 rsa2048 rsa2048&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Max. PIN lengths .: 127 127 127&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PIN retry counter : 3 0 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Signature counter : 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;KDF setting ......: off&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;UIF setting ......: Sign=off Decrypt=off Auth=off&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Signature key ....: [none]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Encryption key....: [none]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Authentication key: [none]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;General key info..: [none]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;step-1-change-pin&quot;&gt;Step 1: Change PIN&lt;&#x2F;h3&gt;
&lt;p&gt;PGP smartcards use PINs (user and admin PIN) for confirming operations such as creation of keys, changes of data or signing stuff. These PINs are &lt;strong&gt;different&lt;&#x2F;strong&gt; from the FIDO2 part of your token and you set them up separately. It’s good to start by changing them.&lt;&#x2F;p&gt;
&lt;p&gt;Factory defaults:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;User PIN: &lt;code&gt;123456&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Admin PIN: &lt;code&gt;12345678&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;To do that, we need to enter GPG command-line interface on the token:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ gpg --card-edit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And unlock admin-space commands:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&#x2F;card&amp;gt; admin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then proceed to the PIN management menu:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&#x2F;card&amp;gt; passwd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg: OpenPGP card no. 00000000000000000000000000000000 detected&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;1 - change PIN&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2 - unblock PIN&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;3 - change Admin PIN&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;4 - set the Reset Code&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Q - quit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Your selection?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Pick option &lt;code&gt;3&lt;&#x2F;code&gt;, which will prompt you to change admin PIN. Then use option &lt;code&gt;1&lt;&#x2F;code&gt; to change user PIN, and &lt;code&gt;Q&lt;&#x2F;code&gt; to exit PIN change menu.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;step-2-configuring-cryptography&quot;&gt;Step 2: Configuring cryptography&lt;&#x2F;h3&gt;
&lt;p&gt;PGP on the token will generate 3 keys: primary &lt;strong&gt;S&lt;&#x2F;strong&gt;igning and &lt;strong&gt;C&lt;&#x2F;strong&gt;ertifying key &lt;code&gt;[SC]&lt;&#x2F;code&gt;, &lt;strong&gt;A&lt;&#x2F;strong&gt;uthentication sub-key &lt;code&gt;[A]&lt;&#x2F;code&gt; and &lt;strong&gt;E&lt;&#x2F;strong&gt;ncryption sub-key &lt;code&gt;[E]&lt;&#x2F;code&gt;. Default algorithm for all of these keys is &lt;code&gt;rsa2048&lt;&#x2F;code&gt;, which is a safe bet for compatibility with everything, but it’s definitely not the best modern option.&lt;&#x2F;p&gt;
&lt;p&gt;Command used to create keys will &lt;strong&gt;not&lt;&#x2F;strong&gt; prompt you to select algorithm, you need to select those first using the following command:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&#x2F;card&amp;gt; key-attr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Which will then prompt you to select algorithm and elliptic curve for each of the keys to be generated.&lt;&#x2F;p&gt;
&lt;p&gt;For a widely supported modern setup, pick &lt;code&gt;ECC&lt;&#x2F;code&gt; and &lt;code&gt;Curve 25519&lt;&#x2F;code&gt; in every case.&lt;&#x2F;p&gt;
&lt;p&gt;Once that’s done you can run the following command to verify that changes have been made to your token’s configuration:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&#x2F;card&amp;gt; list&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;. . .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Key attributes ...: ed25519 cv25519 ed25519&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;. . .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;step-3-generating-keys&quot;&gt;Step 3: Generating keys&lt;&#x2F;h3&gt;
&lt;p&gt;With that out of the way, we can actually generate our set of keys!&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&#x2F;card&amp;gt; generate&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;div class=&quot;side-note&quot;&gt;
    &lt;strong&gt;Note:&lt;&#x2F;strong&gt;&amp;nbsp;This section is &lt;em&gt;&lt;strong&gt;important&lt;&#x2F;strong&gt;&lt;&#x2F;em&gt; as it will determine your ability to create a clone of your token’s PGP keys. &lt;strong style=&quot;color:orange&quot;&gt;Please read carefully!&lt;&#x2F;strong&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;You will be asked if you want to make an off-card backup of the encryption key.&lt;&#x2F;p&gt;
&lt;p&gt;For maximum security it’s best to select &lt;strong&gt;N&lt;&#x2F;strong&gt;, because the default action &lt;strong&gt;Y&lt;&#x2F;strong&gt; will save the key to your computer and then copy it to the token, defeating the purpose of storing keys in isolation on dedicated hardware.&lt;&#x2F;p&gt;
&lt;p&gt;But it also means that once the keys are generated they &lt;em&gt;&lt;strong&gt;cannot be exported&lt;&#x2F;strong&gt;&lt;&#x2F;em&gt; so no backup copy can be made. I describe an alternative procedure for creating an exact clone of two tokens &lt;a href=&quot;https:&#x2F;&#x2F;flufftech.net&#x2F;posts&#x2F;configuring-security-key-for-pgp-and-ssh&#x2F;#alternative-key-generation-for-token-backup&quot;&gt;in another section&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;After that you will be prompted to authenticate with PIN and select standard options for your key such as expiration time and your identity. You will be able to change your UID or add more than one later on.&lt;&#x2F;p&gt;
&lt;p&gt;After picking all the options and accepting them, it’s done. Your Token2 security key now holds a set of PGP keys that you can use for all the standard things that these keys are used for, such as encrypting your emails, creating encrypted backup archives, signing git commits and many more. PGP is a beautifully standard solution in the computer world.&lt;&#x2F;p&gt;
&lt;p&gt;You can run the &lt;code&gt;list&lt;&#x2F;code&gt; command once more to verify that your keys have been generated correctly:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&#x2F;card&amp;gt; list&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;. . .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Signature key ....: A3D6 FF6F 7A89 3043 763F  5168 3AEB 1058 B661 2722&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      created ....: 2026-07-23 18:32:29&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Encryption key....: CB88 B08E CD20 8F68 EB05  5938 1F94 F58E 4B03 9FF8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      created ....: 2026-07-23 18:32:29&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Authentication key: 4CD3 8306 5841 664A BE68  685A 3F40 606D 8586 A4F0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      created ....: 2026-07-23 18:32:29&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;General key info..:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;pub  ed25519&#x2F;3AEB1058B6612722 2026-07-23 test &amp;lt;test@example.com&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sec&amp;gt;  ed25519&#x2F;3AEB1058B6612722  created: 2026-07-23  expires: never&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                                card-no: 0000 00000000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ssb&amp;gt;  ed25519&#x2F;3F40606D8586A4F0  created: 2026-07-23  expires: never&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                                card-no: 0000 00000000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ssb&amp;gt;  cv25519&#x2F;1F94F58E4B039FF8  created: 2026-07-23  expires: never&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                                card-no: 0000 00000000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And the following command outside the GPG environment on your computer to verify that private key stubs have been correctly loaded into your local keyring:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ gpg --list-secret-keys&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;. . .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sec&amp;gt;  ed25519 2026-07-23 [SC]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      A3D6FF6F7A893043763F51683AEB1058B6612722&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      Card serial no. = 0000 00000000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;uid           [ultimate] test &amp;lt;test@example.com&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ssb&amp;gt;  ed25519 2026-07-23 [A]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ssb&amp;gt;  cv25519 2026-07-23 [E]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Note the &lt;code&gt;&amp;gt;&lt;&#x2F;code&gt; symbol next to keys. It indicates that the keys is stored on a token, not on your computer.&lt;&#x2F;p&gt;
&lt;p&gt;Changes to that key can be made the standard GPG way of using &lt;code&gt;gpg --edit-key KEY_FINGERPRINT&lt;&#x2F;code&gt; command. That can be useful to add extra identities with different email addresses for example.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;step-4-import-keys-on-other-computers&quot;&gt;Step 4: Import keys on other computers&lt;&#x2F;h3&gt;
&lt;p&gt;One thing that I noticed basically none of the guides on the internet is talking about is loading keys from your token into the local keyring so you can actually use them.&lt;&#x2F;p&gt;
&lt;p&gt;During initial key s setup public keys are imported and private key stubs are added to the keyring, but if you want to use the same already configured token on a different device or if you changed your operating system, you need to set a few more things to be able to do that easily.&lt;&#x2F;p&gt;
&lt;p&gt;GPG’s built-in card environment includes &lt;code&gt;fetch&lt;&#x2F;code&gt; command which does exactly that, but for it to work properly you need to configure a URL on the internet from which your public keys will be imported.&lt;&#x2F;p&gt;
&lt;p&gt;I genuinely don’t understand why this can’t be simply done locally since all the keys are literally there, but that’s the way it’s done 🤷 If I’m actually wrong here and there’s a better way, please let me know.&lt;&#x2F;p&gt;
&lt;p&gt;But alas, for this step you need to export your public key and put it online (which is fine! public keys are meant for sharing!). You can use a well-established public PGP key server such as &lt;a class=&quot;external&quot; rel=&quot;noopener nofollow external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;keys.openpgp.org&#x2F;&quot;&gt;keys.openpgp.org&lt;&#x2F;a&gt; for example, but I just &lt;a href=&quot;&#x2F;pgpkey.asc&quot;&gt;uploaded mine to my website&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Here’s a command to export your public key in a plaintext readable format:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ gpg --export --armor KEY_FINGERPRINT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Output should look like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;-----BEGIN PGP PUBLIC KEY BLOCK-----&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xjMEamJjmBYJKwYBBAHaRw8BAQdAqTghyjm+5ajp71X4Z7wwfbVoD+dQllE5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;uIh+y&#x2F;gq3XHNF3Rlc3QgPHRlc3RAZXhhbXBsZS5jb20+wowEEBYKAD4Fgmpi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Y5gECwkHCAmQyhE0EsNnUPADFQgKBBYAAgECGQECmwMCHgEWIQRDMznItGnQ&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;7ciFoFPKETQSw2dQ8AAA&#x2F;zUA&#x2F;3tx7GNTsdR1VDAvu&#x2F;+H6T4z05Iyx2Z1+vlF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;w71qFAUAP9y01ZJc0GT5PlpXcYUNaKnw9Ppviok3mu5GgLaigrIDM44BGpi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Y5gSCisGAQQBl1UBBQEBB0BWTiDR&#x2F;eDmQzpalzQ2CiygNpPxDRtgHmsznHy&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SCurJQMBCAfCeAQYFgoAKgWCamJjmAmQyhE0EsNnUPACmwwWIQRDMznItGnQ&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;7ciFoFPKETQSw2dQ8AAAvgwBAMNi62VPYmYmcpGmzvK0kdFQKJXyjCbKl&#x2F;Dd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;6du6d1BXAQDazFUtOA1Zn8lK5YHZjoOL7xQZsyUIEl12WwQUxXd&#x2F;Ag==&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;=WUWn&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;-----END PGP PUBLIC KEY BLOCK-----&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You can either paste it into an online key server or save it as a file with &lt;code&gt;.asc&lt;&#x2F;code&gt; extension and host somewhere.&lt;&#x2F;p&gt;
&lt;p&gt;Once you do that, you can go back to the GPG environment on your key and set up key fetching:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&#x2F;card&amp;gt; url&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;URL to retrieve public key:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You need to enter a full URL from which your public key can be obtained, for me it’s going to be &lt;code&gt;https:&#x2F;&#x2F;flufftech.net&#x2F;pgpkey.asc&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;And it’s done! You can set up some other extra settings that are mostly unimportant (such as &lt;code&gt;name&lt;&#x2F;code&gt; or &lt;code&gt;salutation&lt;&#x2F;code&gt; which are mostly used with an actual card-format smartcards) or type &lt;code&gt;quit&lt;&#x2F;code&gt; to exit the GPG shell, since you’re set up now.&lt;&#x2F;p&gt;
&lt;p&gt;Now when you connect your token to a new computer, you can import your keys into the local keyring in seconds by using this procedure:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ gpg --card-edit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&#x2F;card&amp;gt; fetch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And your keys are ready to use.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;step-5-setting-up-ssh-key&quot;&gt;Step 5: Setting up SSH key&lt;&#x2F;h3&gt;
&lt;p&gt;An extra feature of this setup is that it you use your PGP key as your SSH key.&lt;&#x2F;p&gt;
&lt;div class=&quot;side-note&quot;&gt;
    &lt;strong&gt;Note:&lt;&#x2F;strong&gt;&amp;nbsp;This is different from generating &lt;code&gt;ed25519-sk&lt;&#x2F;code&gt; or &lt;code&gt;ecdsa-sk&lt;&#x2F;code&gt; type keys with &lt;code&gt;ssh-keygen&lt;&#x2F;code&gt;, as that will generate a special type of dedicated SSH private key that uses FIDO functionality of your token to access. If you don’t want to use PGP features of the token or you have a FIDO-only U2F device without PGP support, that might be a great alternative for you!
&lt;&#x2F;div&gt;
&lt;p&gt;But since I have all my keys on the token, we’re going to use them together with &lt;code&gt;gpg-agent&lt;&#x2F;code&gt; to use them for SSH.&lt;&#x2F;p&gt;
&lt;div class=&quot;side-note&quot;&gt;
    &lt;strong&gt;Note:&lt;&#x2F;strong&gt;&amp;nbsp;The following section assumes you don’t already use &lt;code&gt;gpg-agent&lt;&#x2F;code&gt; as your SSH agent. If you do, I’m sure you can figure it out.
&lt;&#x2F;div&gt;
&lt;p&gt;To do this, you need to edit your &lt;code&gt;~&#x2F;.gnupg&#x2F;gpg-agent.conf&lt;&#x2F;code&gt; file and add the following config options to it:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;enable-ssh-support&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;write-env-file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;enable-ssh-support&lt;&#x2F;code&gt; is pretty self-explanatory, it enables support for SSH keys in &lt;code&gt;gpg-agent&lt;&#x2F;code&gt; – it will automatically load SSH key from your PGP keys.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;write-env-file&lt;&#x2F;code&gt; is used to share agent information with other processes and sessions as a file so they can always access it.&lt;&#x2F;p&gt;
&lt;p&gt;Another option I really recommend you set up is &lt;code&gt;pinentry-program&lt;&#x2F;code&gt;, which will be used to help you with PIN&#x2F;password prompts. On GNOME the best choice is &lt;code&gt;&#x2F;usr&#x2F;bin&#x2F;pinentry-gnome3&lt;&#x2F;code&gt;, if you run KDE use &lt;code&gt;&#x2F;usr&#x2F;bin&#x2F;pinentry-qt&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;If you use GNOME, there is a decent chance that GNOME Keyring will interfere with this so it’s best to disable the SSH agent feature of it. That’s usually done by stopping and disabling &lt;code&gt;gcr-ssh-agent.socket&lt;&#x2F;code&gt; and &lt;code&gt;gcr-ssh-agent.service&lt;&#x2F;code&gt; systemd units with &lt;code&gt;systemctl&lt;&#x2F;code&gt; command.&lt;&#x2F;p&gt;
&lt;p&gt;The last step is to reload &lt;code&gt;gpg-agent&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ gpg-connect-agent reloadagent &#x2F;bye&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And set &lt;code&gt;SSH_AUTH_SOCK&lt;&#x2F;code&gt; env variable for your session.&lt;&#x2F;p&gt;
&lt;p&gt;I use &lt;code&gt;fish&lt;&#x2F;code&gt; shell so I added the following 2 lines into my &lt;code&gt;~&#x2F;.config&#x2F;fish&#x2F;config.fish&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;fish&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #0DB9D7;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span&gt; -gx SSH_AGENT_PID &lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #0DB9D7;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span&gt; -gx SSH_AUTH_SOCK &lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt;$XDG_RUNTIME_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt;&#x2F;gnupg&#x2F;S.gpg-agent.ssh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If you use &lt;code&gt;bash&lt;&#x2F;code&gt;, add this into your &lt;code&gt;~&#x2F;.bashrc&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #0DB9D7;&quot;&gt;unset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt; SSH_AGENT_PID&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #BB9AF7;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; [ &amp;quot;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt;gnupg_SSH_AUTH_SOCK_by&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:-&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BB9AF7;&quot;&gt; -ne&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F7768E;&quot;&gt; $$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; ];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BB9AF7;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9D7CD8;font-style: italic;&quot;&gt;  export&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt; SSH_AUTH_SOCK&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt;gpgconf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E0AF68;&quot;&gt; --list-dirs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt; agent-ssh-socket&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #BB9AF7;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Make sure to reload your session for this to take effect.&lt;&#x2F;p&gt;
&lt;p&gt;Assuming everything worked out the way it should, this should be enough to automatically load SSH key from your token whenever you plug it in.&lt;&#x2F;p&gt;
&lt;p&gt;You can verify that by running this command:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ ssh-add -L&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFYX3suL5yb0099HU5jIz+ttx8Q8VMFRKtzLsrZu0ikX cardno:0000_00000000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If the output you see is similar to the above, with standard SSH key and a comment including your token’s serial number, it’s all good. If there’s nothing, it means something is wrong with the &lt;code&gt;gpg-agent&lt;&#x2F;code&gt; configuration to appending your SSH key into &lt;code&gt;~&#x2F;.gnupg&#x2F;sshcontrol&lt;&#x2F;code&gt; file.&lt;&#x2F;p&gt;
&lt;p&gt;You can fix that manually by finding the keygrip of your &lt;code&gt;[A]&lt;&#x2F;code&gt; subkey from the token:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ gpg --list-keys --with-keygrip&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;. . .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sub   ed25519 2026-07-23 [A]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      Keygrip = F635631A0BD254172DA068AED25E8C0B74BB40D5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then add the keygrip value (here it’s &lt;code&gt;F635631A0BD254172DA068AED25E8C0B74BB40D5&lt;&#x2F;code&gt;) into &lt;code&gt;~&#x2F;.gnupg&#x2F;sshcontrol&lt;&#x2F;code&gt; manually and reload the agent. That should do the trick.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;alternative-key-generation-for-token-backup&quot;&gt;Alternative key generation for token backup&lt;&#x2F;h2&gt;
&lt;p&gt;As I mentioned before, generating keys &lt;em&gt;on&lt;&#x2F;em&gt; the token is safer, but has its downsides in the form or losing the ability to create backup of private keys. Oddly enough, GPG doesn’t let you know about this limitation.&lt;&#x2F;p&gt;
&lt;p&gt;Attempting to export your private key stored on a token with a command like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt; gpg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E0AF68;&quot;&gt; --export-private-keys -a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt; KEY_FINGERPRINT&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt; private.key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Will result in an export of a private key &lt;em&gt;stub&lt;&#x2F;em&gt; which is effectively garbage. It really should result in an error instead but it doesn’t and this behavior can be really confusing.&lt;&#x2F;p&gt;
&lt;p&gt;A solution to this problem can be generating a set of keys locally on your computer and then copying them over to your token. In terms of security this is worse, as private keys aren’t isolated entirely inside the token, but this will let us have two tokens with the exact same set of keys for backup.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;step-1-temporary-keyring&quot;&gt;Step 1: Temporary keyring&lt;&#x2F;h3&gt;
&lt;p&gt;For this process we will create a temporary GnuPG home directory in our computer’s RAM so none of the sensitive data makes it to storage.&lt;&#x2F;p&gt;
&lt;p&gt;Let’s start by verifying that local &lt;code&gt;&#x2F;tmp&lt;&#x2F;code&gt; directory is &lt;em&gt;actually&lt;&#x2F;em&gt; on physical hardware RAM. It usually is but now always.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt; df&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E0AF68;&quot;&gt; -h&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #0DB9D7;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt; . .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt;tmpfs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt;            12G   21M   12G   1% &#x2F;tmp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If you see a line like this including &lt;code&gt;tmpfs&lt;&#x2F;code&gt; next to your mounted &lt;code&gt;&#x2F;tmp&lt;&#x2F;code&gt; directory, you’re good to go. If it’s anything else, stop right here and get yourself a &lt;code&gt;tmpfs&lt;&#x2F;code&gt; working directory for this purpose.&lt;&#x2F;p&gt;
&lt;p&gt;So now we can switch GnuPG to a temporary working space:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt; export GNUPGHOME=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt;mktemp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E0AF68;&quot;&gt; -d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And verify it succeeded by running:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt; gpg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E0AF68;&quot;&gt; --list-secret-keys&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;It should be empty&lt;&#x2F;p&gt;
&lt;div class=&quot;side-note&quot;&gt;
    &lt;strong&gt;Note:&lt;&#x2F;strong&gt;&amp;nbsp;Remember that this &lt;code&gt;$GNUPGHOME&lt;&#x2F;code&gt; override is specific to your currently open shell, avoid doing any of those operations in a different shell session from now on.
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;step-2-local-key-generation&quot;&gt;Step 2: Local key generation&lt;&#x2F;h3&gt;
&lt;p&gt;Now let’s create our keys:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt; gpg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E0AF68;&quot;&gt; --full-generate-key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Follow the usual options for key generation, with the default &lt;code&gt;ECC (sign and encrypt)&lt;&#x2F;code&gt; &amp;amp; &lt;code&gt;Curve 25519&lt;&#x2F;code&gt; combo being a good option. GPG will be very unhappy with you when you decide to make a key without a password, but for this purpose it’s actually okay to do it this way since key on the token will be protected by PIN for all sensitive operations.&lt;&#x2F;p&gt;
&lt;p&gt;The default key generation process creates only &lt;code&gt;[SC]&lt;&#x2F;code&gt; primary key and &lt;code&gt;[E]&lt;&#x2F;code&gt; encryption subkey. We have to create an additional &lt;code&gt;[A]&lt;&#x2F;code&gt; authentication subkey manually:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C0CAF5;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt; gpg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E0AF68;&quot;&gt; --expert --edit-key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECE6A;&quot;&gt; KEY_FINGERPRINT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Once in expert edit mode, let’s add a subkey:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&amp;gt; addkey&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Please select what kind of key you want:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (3) DSA (sign only)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (4) RSA (sign only)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (5) Elgamal (encrypt only)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (6) RSA (encrypt only)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (7) DSA (set your own capabilities)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (8) RSA (set your own capabilities)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (10) ECC (sign only)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (11) ECC (set your own capabilities)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (12) ECC (encrypt only)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (13) Existing key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (14) Existing key from card&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Your selection?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Select &lt;code&gt;11&lt;&#x2F;code&gt;. The default will be a signing &lt;code&gt;[S]&lt;&#x2F;code&gt; subkey.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Possible actions for this ECC key: Sign Authenticate&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Current allowed actions: Sign&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (S) Toggle the sign capability&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (A) Toggle the authenticate capability&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (Q) Finished&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Your selection?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;First select &lt;code&gt;A&lt;&#x2F;code&gt; to allow authenticate, then &lt;code&gt;S&lt;&#x2F;code&gt; to disable sign feature. Then &lt;code&gt;Q&lt;&#x2F;code&gt; to save.&lt;&#x2F;p&gt;
&lt;p&gt;Select the default &lt;code&gt;Curve 25519&lt;&#x2F;code&gt; curve, your preferred expiration and skip setting a password again.&lt;&#x2F;p&gt;
&lt;p&gt;Output should look like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sec  ed25519&#x2F;8BC55E989F30E234&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     created: 2026-07-23  expires: never       usage: SC&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     trust: ultimate      validity: ultimate&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ssb  cv25519&#x2F;CA1E4DF2A5758FEB&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     created: 2026-07-23  expires: never       usage: E&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ssb  ed25519&#x2F;DF08FED94A66B8FB&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     created: 2026-07-23  expires: never       usage: A&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[ultimate] (1). test &amp;lt;test@example.com&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;step-3-moving-keys-to-the-token&quot;&gt;Step 3: Moving keys to the token&lt;&#x2F;h3&gt;
&lt;p&gt;Now we can begin copying our keys to both tokens.&lt;&#x2F;p&gt;
&lt;p&gt;A few notes:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;keytocard&lt;&#x2F;code&gt; command can only move one key or subkey at a time, so for each token you need to use it 3 times.&lt;&#x2F;li&gt;
&lt;li&gt;Be careful to &lt;em&gt;&lt;strong&gt;not&lt;&#x2F;strong&gt;&lt;&#x2F;em&gt; use &lt;code&gt;save&lt;&#x2F;code&gt; command before all keys are moved to both tokens, as it will remove the locally stored key after &lt;code&gt;keytocard&lt;&#x2F;code&gt; command it used.&lt;&#x2F;li&gt;
&lt;li&gt;After adding keys to the first token, swapping tokens will confuse GPG and it will not be able to do anything. Use &lt;code&gt;quit&lt;&#x2F;code&gt; command and re-enter the &lt;code&gt;--edit-key&lt;&#x2F;code&gt; environment.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Moving primary key:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&amp;gt; keytocard&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Really move the primary key? (y&#x2F;N) y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Please select where to store the key:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (1) Signature key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (3) Authentication key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Your selection?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Select &lt;code&gt;y&lt;&#x2F;code&gt; and then &lt;code&gt;1&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;To move the &lt;code&gt;[E]&lt;&#x2F;code&gt; subkey first copy it’s fingerprint from the list, then select it:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&amp;gt; key E_SUBKEY_FINGERPRINT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&amp;gt; keytocard&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Please select where to store the key:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (2) Encryption key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Your selection?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Select &lt;code&gt;2&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Now to move the &lt;code&gt;[A]&lt;&#x2F;code&gt; subkey you first need to un-select the previous key, select &lt;code&gt;[A]&lt;&#x2F;code&gt; key and only then you can proceed:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&amp;gt; key E_SUBKEY_FINGERPRINT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&amp;gt; key A_SUBKEY_FINGERPRINT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpg&amp;gt; keytocard&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Please select where to store the key:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   (3) Authentication key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Your selection?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Select &lt;code&gt;3&lt;&#x2F;code&gt; and type &lt;code&gt;quit&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Verify that all keys have been moved:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #A9B1D6; background-color: #1A1B26;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ gpg --card-status&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;. . .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Signature key ....: E6F9 C957 0C88 42FA 0BE7  8FE5 8BC5 5E98 9F30 E234&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      created ....: 2026-07-23 20:53:48&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Encryption key....: 30C7 7655 B800 09A2 7C18  7BBB CA1E 4DF2 A575 8FEB&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      created ....: 2026-07-23 20:53:48&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Authentication key: A187 B940 5D19 F956 0D6F  3C81 DF08 FED9 4A66 B8FB&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      created ....: 2026-07-23 21:03:39&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;General key info..: pub  ed25519&#x2F;8BC55E989F30E234 2026-07-23 test &amp;lt;test@example.com&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sec   ed25519&#x2F;8BC55E989F30E234  created: 2026-07-23  expires: never&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ssb   cv25519&#x2F;CA1E4DF2A5758FEB  created: 2026-07-23  expires: never&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ssb   ed25519&#x2F;DF08FED94A66B8FB  created: 2026-07-23  expires: never&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If the output looks something like this, congrats, the move has worked!&lt;&#x2F;p&gt;
&lt;p&gt;You can now swap the tokens, re-enter &lt;code&gt;--edit-key&lt;&#x2F;code&gt; environment and repeat the exact same procedure.&lt;&#x2F;p&gt;
&lt;div class=&quot;side-note&quot;&gt;
    &lt;strong&gt;Note:&lt;&#x2F;strong&gt;&amp;nbsp;It’s best to export public key for the &lt;code&gt;fetch&lt;&#x2F;code&gt; functionality on the token before you delete local copy of all keys because otherwise &lt;code&gt;--full-generate-key&lt;&#x2F;code&gt; can import private key stubs from token but only one at a time. Using &lt;code&gt;fetch&lt;&#x2F;code&gt; grabs them all.
&lt;&#x2F;div&gt;
&lt;p&gt;Once you’re done doing that, you can actually quit edit environment using &lt;code&gt;save&lt;&#x2F;code&gt;, which will remove local copy of all affected keys.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;wow-that-was-pretty-long&quot;&gt;Wow that was pretty long&lt;&#x2F;h2&gt;
&lt;p&gt;If you reached this far wow I’m proud of you, you’re such a massive nerd, you deserve a medal 🏅&lt;&#x2F;p&gt;
&lt;p&gt;I have a few words to end this post with, mostly that it was a really interesting journey that tought me some cool things and overall made me more comfortable with handling PGP keys. It was definitely worth it and I sincerely recommend you play with it yourself.&lt;&#x2F;p&gt;
&lt;p&gt;A bonus piece of information I have for you is that this entire project was much funnier for me considering that the entire time I’ve been setting up cryptography stuff on my collar :3&lt;&#x2F;p&gt;

    


    


    


&lt;div class=&quot;media-wrapper &quot;&gt;

    &lt;figure class=&quot;media image&quot;&gt;
        &lt;a href=&quot;&amp;#x2F;posts&amp;#x2F;configuring-security-key-for-pgp-and-ssh&amp;#x2F;pgp-and-ssh-enabled-collar.jpg&quot;&gt;
            
    
    
    
        
    
    
        
        

        
            
        

        
            
        
    
    &lt;picture&gt;
        &lt;source srcset=&quot;https:&amp;#x2F;&amp;#x2F;flufftech.net&amp;#x2F;processed_images&amp;#x2F;pgp-and-ssh-enabled-collar.e20abc020e2990d0.webp, https:&amp;#x2F;&amp;#x2F;flufftech.net&amp;#x2F;processed_images&amp;#x2F;pgp-and-ssh-enabled-collar.1cf2b5b6dbed45ec.webp 2x, https:&amp;#x2F;&amp;#x2F;flufftech.net&amp;#x2F;processed_images&amp;#x2F;pgp-and-ssh-enabled-collar.1719c9681223d813.webp 3x&quot; type=&quot;image&#x2F;webp&quot;&gt;
        &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;flufftech.net&amp;#x2F;processed_images&amp;#x2F;pgp-and-ssh-enabled-collar.1ddf6d90265356da.jpg&quot; width=&quot;675&quot; height=&quot;508&quot; alt=&quot;jpg file named &amp;#x2F;posts&amp;#x2F;configuring-security-key-for-pgp-and-ssh&amp;#x2F;pgp-and-ssh-enabled-collar.jpg&quot; &gt;
    &lt;&#x2F;picture&gt;

        &lt;&#x2F;a&gt;
        
        &lt;figcaption class=&quot;media-caption&quot;&gt;
            
                &lt;div class=&quot;caption&quot;&gt;This cool accessory is like 1000x cooler now :3&lt;&#x2F;div&gt;
            
            
        &lt;&#x2F;figcaption&gt;
        
    &lt;&#x2F;figure&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;Now I literally can SSH into my servers with my collar and it’s genuinely perfect.&lt;&#x2F;p&gt;
&lt;p&gt;If you have any questions or want to share your thoughts, feel free to send me an email or reach me on the Fediverse ^^&lt;&#x2F;p&gt;
</description>
      </item>
    </channel>
</rss>
