使用Nitrokey 3与nitropy的关系¶
``nitropy``可用于列出和管理Nitrokey 3设备。
安装¶
请参阅`本指南<https://docs.nitrokey.com/software/nitropy/all-platforms/installation>`__了解pynitrokey的安装说明。
列出硝基钥匙3设备¶
使用``nitropy list`或``nitropy nk3 list``来列出所有连接的设备。
$ nitropy list
Nitrokey tool for Nitrokey FIDO2, Nitrokey Start, Nitrokey 3 & NetHSM
:: 'Nitrokey FIDO2' keys
:: 'Nitrokey Start' keys:
:: 'Nitrokey 3' keys
/dev/hidraw3: Nitrokey 3
$ nitropy nk3 list
Nitrokey tool for Nitrokey FIDO2, Nitrokey Start, Nitrokey 3 & NetHSM
:: 'Nitrokey 3' keys
/dev/hidraw3: Nitrokey 3
查询设备信息¶
目前有以下命令可用于查询设备信息。
nitropy nk3 version
:查询设备的固件版本。$ nitropy nk3 version Nitrokey tool for Nitrokey FIDO2, Nitrokey Start, Nitrokey 3 & NetHSM v1.0.0
在多个设备上工作¶
如果连接了多个Nitrokey 3设备,你可以使用``--path``选项来选择其中一个。 要确定一个设备的路径,使用``nitropy list`或``nitropy nk3 list``命令。
$ nitropy nk3 version
Nitrokey tool for Nitrokey FIDO2, Nitrokey Start, Nitrokey 3 & NetHSM
Error: Multiple Nitrokey 3 devices found -- use the --path option to select one
$ nitropy nk3 list
Nitrokey tool for Nitrokey FIDO2, Nitrokey Start, Nitrokey 3 & NetHSM
:: 'Nitrokey 3' keys
/dev/hidraw4: Nitrokey 3 DD59A7F00CCB715DB515F83C346CA8AD
/dev/hidraw3: Nitrokey 3
$ nitropy nk3 --path /dev/hidraw3 version
Nitrokey tool for Nitrokey FIDO2, Nitrokey Start, Nitrokey 3 & NetHSM
v1.0.0
$ nitropy nk3 --path /dev/hidraw4 version
Nitrokey tool for Nitrokey FIDO2, Nitrokey Start, Nitrokey 3 & NetHSM
v1.0.1
故障排除¶
要诊断你的Nitrokey 3设备的问题,你可以使用``nitropy nk3 test``命令。 它执行了一些测试,以确定你的设备的状态。
如果测试成功,会打印出步骤的摘要。
$ nitropy nk3 test
Nitrokey tool for Nitrokey FIDO2, Nitrokey Start, Nitrokey 3 & NetHSM
Found 1 Nitrokey 3 device(s):
- Nitrokey 3 at /dev/hidraw3
Running tests for Nitrokey 3 at /dev/hidraw3
[1/3] UUID query SUCCESS [not supported]
[2/3] Firmware version query SUCCESS v1.0.0
Please press the touch button on the device ...
Please press the touch button on the device ...
[3/3] FIDO2 SUCCESS
3 tests, 3 successful, 0 skipped, 0 failed
Summary: 1 device(s) tested, 1 successful, 0 failed
如果测试失败,错误信息中包含有详细信息的日志文件的路径。 请在支持请求中包括这个日志文件。
如果你为你的设备设置了一个FIDO2引脚,你必须使用``--pin``选项。
$ nitropy nk3 test --pin 1234