YubiKey

Tools

First Time Setup

sh

# View info on connected devices
ykman info

# Configure the modes you need
# Just be sure to disable OTP (one touch passwords) as they're prone to being accidentally sent
ykman config mode "FIDO+CCID"

# Set FIDO Pin
ykman fido access change-pin <pin>

SSH Key

SSH keys can be stored on FIDO devices to help protect against private key thefts.

Creation

sh

# Generate SSH Key and store on FIDO device
KEY_NAME=<name>
EMAIL=<email>
ssh-keygen -t ed25519-sk -O resident -O application=ssh:$KEY_NAME -C "$EMAIL" -f "${HOME}/.ssh/${KEY_NAME}_id_ed25519_sk"

Importing Your Key For Other Machines

sh

ssh-keygen -K