1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
YubiKey Mode Switch
-------------------
The YubiKey can be mode-switched from the U2F-only mode using
libu2f-host by sending some non-standardized commands.
echo -e '\x06\x00\x00\x00' | u2f-host -d -a sendrecv -c c0
The '\x06' corresponds to mode 6 and the following modes are known:
- 0 OTP device only.
- 1 CCID device only.
- 2 OTP/CCID composite device.
- 3 U2F device only.
- 4 OTP/U2F composite device.
- 5 U2F/CCID composite device.
- 6 OTP/U2F/CCID composite device.
Add 80 to set MODE_FLAG_EJECT, for example: 81 is mode 1 (CCID-only)
with MODE_FLAG_EJECT. To select another mode, replace \x06 with what
you wish. For example, if you want to put the YubiKey into pure OTP-mode
use the following:
echo -e '\x01\x00\x00\x00' | u2f-host -d -a sendrecv -c c0
For mode-switching in other modes (OTP, CCID or combo modes), we
recommend the following libraries and command-line tools instead:
For OTP-modes:: https://developers.yubico.com/yubikey-personalization[YubiKey Personalization]
For CCID-modes:: https://developers.yubico.com/libykneomgr[YubiKey NEO CCID Manager C Library]
If you prefer a GUI (for all modes):: https://developers.yubico.com/yubikey-neo-manager[YubiKey NEO Manager]
|