ykpersonalize

Configure YubiKey authentication slots

TLDR

Show YubiKey status
$ ykpersonalize -v
Program slot 1 with Yubico OTP
$ ykpersonalize -1
Program slot 2 with challenge-response
$ ykpersonalize -2 -ochal-resp -ochal-hmac
Set static password in slot 2
$ ykpersonalize -2 -ostatic-ticket
Set CCID mode
$ sudo ykpersonalize -m 86
Program with specific AES key
$ ykpersonalize -1 -a[hex_key]
Set access code to protect configuration
$ ykpersonalize -oaccess=[hex_code]

SYNOPSIS

ykpersonalize [options]

DESCRIPTION

ykpersonalize configures YubiKey hardware tokens from Yubico. It can program the two configuration slots with various authentication modes including Yubico OTP, HMAC-SHA1 challenge-response, and static passwords.Each YubiKey has two slots: slot 1 activates on short touch, slot 2 on long touch. Slots can be independently configured for different use cases like OTP authentication and disk encryption.Access codes can protect configuration from unauthorized changes. The tool requires direct USB access to the YubiKey.

PARAMETERS

-1 / -2

Program slot 1 or slot 2.
-a key
Set AES key (hex encoded).
-c code
Current access code to unlock.
-oaccess= code
Set new access code.
-ochal-resp
Enable challenge-response mode.
-ochal-hmac
Use HMAC-SHA1 for challenge-response.
-ostatic-ticket
Enable static password mode.
-m mode
Set USB mode (OTP, CCID, etc.).
-v
Verbose output.
-y
Auto-confirm operations.

INSTALL

sudo apt install yubikey-personalization
sudo dnf install ykpers
sudo pacman -S yubikey-personalization
sudo apk add ykpers
sudo zypper install ykpers
brew install yubikey-personalization
nix profile install nixpkgs#yubikey-personalization

CAVEATS

Programming overwrites existing slot configuration. Access codes prevent reconfiguration without the code. Some operations require root. Superseded by ykman for newer features.

HISTORY

ykpersonalize was developed by Yubico as part of the yubikey-personalization package for configuring YubiKey tokens. While still functional, Yubico now recommends ykman (YubiKey Manager) for newer YubiKey models and features.

SEE ALSO

ykman(1), ykinfo(1)