Use Nitrokey 3 PIV with OpenSC #PKCS11 for SSH
We will use toolbox to build pivy-tool in a Fedora container. Therefore the build should work in any OS where toolbox is available, including OpenSUSE, Arch and of course Fedora.
We have to run the built binary on the host os, though, becase we need the PC/SC Smart Cart Daemon running.
Make sure your Nitrokey has a firmware that supports PIV. At the time of writing you have to install the test firmware for Nitrokey 3.
Install the latest test firmware.
Pepare the toolbox
Adapbt the following for your OS. Mainly you have to install toolbox and the PC/SC Smart Card Daemon we need later.
Build pivy-tool from within the toolbox
The following commands are now run within the toolbox. If you have not set the
Prepare your Nitrokey
Enter the pivy repository on you hostmachien. Make sure you check for any missing libraries and install them.
Now drop the public key in
and make sure you have the correct permissions set.
Using the Nitrokey for SSH
Specify the OpenSC #PKCS11 library