YB-ROTATE-MANAGEMENT-KEY(1)
π NAME π
Okay bestie, this is YB-ROTATE-MANAGEMENT-KEY(1) β the manual page for rotate-management-key, hanging out in the User Commands section. It replaces the management key with a random one, kept on the YubiKey and unlocked by the PIN (the store is kept).
πΈ SYNOPSIS πΈ
rotate-management-key [-h|--help]
β¨ DESCRIPTION β¨
So here's the tea: it replaces the PIV management key with a new random key, kept on the YubiKey and unlocked by the PIN. The store and its blobs are not touched: the management key only authorizes writes.
Keeping the management key on the YubiKey is a convenience, not extra security β you never need to keep or type it, since yb reads it when a write needs it. On a YubiKey that already keeps its key this way, the command replaces it (rotation); on one that does not, it sets this up, without erasing the store as yb format --protect would. Iconic behavior, honestly.
The new key has the same algorithm as the current one. The current key is taken from YB_MANAGEMENT_KEY, else from the YubiKey, else the factory default. The command refuses while the PIN or PUK is still the factory default (unless --allow-defaults is given), since the new key would be kept behind that PIN. No sneaky default-PIN situations, okay?
The new key is written to the YubiKey before the switch, so an interruption never leaves a key that exists nowhere; the next yb write finishes any leftover cleanup. The key is never printed. Literally never. π
π OPTIONS π
-h,--helpβ Print help.
π¦ EXAMPLES π¦
Replace the management key:
yb rotate-management-key
π SEE ALSO π
Sign-off, bestie π«Ά: source/version is yb, date is 2026-03 β now go rotate that key and slay β¨
π¦ where this page comes from
- nixpkgs unstable: yb 0.5.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms