LinuxCommandLibrary

ykpersonalize

TLDR

Show YubiKey status

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

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.

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), ykchalresp(1), ykinfo(1)

Copied to clipboard