NVME-KEYS-EXPORT(1)
π nvme-keys-export β bestie's guide to the NVMe Manual page π
okay so this is nvme-keys-export, and it lives in the NVMe Manual, and it's honestly lowkey iconic: it exports your NVMe TLS PSKs straight out of a keyring. slay.
β¨ NAME β¨
nvme-keys-export β export NVMe TLS PSKs from a keyring. that's it, that's the whole vibe π«Ά
πΈ SYNOPSIS πΈ
nvme [<global-options>] keys export [--keyring=<name> | -k <name>]
[--keyfile=<file> | -f <file>]
so it's the top-level nvme command, then keys export, then your optional flags. very demure, very mindful. π
π¦ DESCRIPTION π¦
okay so what it does: it exports all the NVMe TLS pre-shared keys (PSKs) from the system keyring, and it writes them out in this exact form:
<identity> <psk>
where <identity> is the TLS PSK identity that the key is stored under π and <psk> is the TLS PSK itself, in PSK interchange format:
NVMeTLSkey-1:<hmac>:<base64 encoded data>:
each key gets its own single line. one key, one line, no cap. β¨
now here's the part where you gotta pay attention, bestie, because it's giving "read the label before you use the product" π β the PSK interchange format otherwise carries a configured PSK. it's what nvme-keys-gen-tls-psk(1) prints, and it's what nvme-keys-insert-tls-psk(1) and nvme-keys-check-tls-psk(1) read. but the keys exported here are TLS PSKs instead. so this output is meant for nvme-keys-import(1), which stores each key back under its identity unchanged. it is not intended to be passed to nvme-keys-insert-tls-psk(1) or nvme-keys-check-tls-psk(1). don't do it. i'm literally begging. π
π OPTIONS π
-k <name>,--keyring=<name>β the name of the keyring you wanna export the TLS PSKs from. default is.nvme. yes, with the dot. periodt. π-f <file>,--keyfile=<file>β a file to write the exported keys to, instead ofstdout. because sometimes you want your secrets in a file and not just vibing in your terminal scrollback. π
π GLOBAL OPTIONS π
these are the options defined at the top-level nvme command, and they're all available to this subcommand. the whole squad, basically. π«Ά
--dry-runβ print the command that would be executed, but don't actually execute it. it's giving rehearsal, not the real performance. π--no-ioctl-probingβ disable probing for 64-bit IOCTL support.--no-retriesβ disable retry logic on transient errors. no second chances, no redo. π-o <fmt>,--output-format=<fmt>β set the reporting format tonormal,tabular,'json, orbinary. only one output format may be used at a time. (yes, the stray quote mark in'json` is exactly how it's written in the manual β we don't fix, we only report. π«‘)--output-format-version=<version>β select the output format version. version 1 uses the original field naming, while version 2 (the default) provides more consistent and script-friendly field names. other versions are rejected. no notes. β¨--quietβ suppress informational messages. errors are still reported, and--quietcancels any--verbosefor the library log level. so pick a lane, bestie. π--set-options=<key=value>[,<key=value>...]β set libnvme library options for this invocation. supported keys areforce-4k,mi-probe-enabled,test-base-dirandtest-sysfs-dir.--timeout=<ms>β set the timeout for the command in milliseconds.infiniteor-1waits without a time limit (0xffffffff). patience is a virtue fr fr π§-v,--verboseβ increase the level of detail in the output. may be specified multiple times to further increase verbosity. the more the merrier π
ok and one more thing: these options can also be set as machine-wide defaults in nvme-cli.conf(5). a command-line flag always overrides the file. flags stay winning. π
β EXAMPLES β
- export previously created keys from the kernel keyring and store them into a file π
# nvme keys export -f nvme-tls-keys.txt
- export/list all keys from the
.nvmekeyring usingnvmeandkeyctlβ look at this little duet, they ate π
# nvme keys export
NVMe0R01 hostnqn0 subsys0 NVMeTLSkey-1:01:/b9tVz2OXJVISnoFgrPAygyS86XYJWkAapQeULns6PMpM8wv:
# keyctl show
Session Keyring
573249525 --alswrv 0 0 keyring: _ses
353599402 --alswrv 0 65534 \_ keyring: _uid.0
475911922 ---lswrv 0 0 \_ keyring: .nvme
649274894 --als-rv 0 0 \_ psk: NVMe0R01 hostnqn0 subsys0
π₯ NVME π₯
part of the nvme-user suite. main character energy, honestly. π
and that's the whole page bestie!! π this was nvme-keys-export(1) from the NVMe Manual, dated 10/30/2026, and it's part of the nvme-user suite β go export some keys responsibly, mwah ππβ¨
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms