NVME-KEYS-INSERT-(1)
πΈ NAME πΈ
okay so you're looking at nvme-keys-insert-tls-psk and that's the whole vibe of this page β¨ it literally inserts a NVMe TLS PSK into a keyring, bestie. no cap.
β¨ SYNOPSIS β¨
the vibe check of how you call it:
nvme [<global-options>] keys insert-tls-psk [--keyring=<name> | -k <name>]
[--keytype=<type> | -t <type>]
[--hostnqn=<nqn> | -n <nqn>]
[--subsysnqn=<nqn> | -c <nqn>]
[--keydata=<key> | -d <key>]
[--identity=<id-vers> | -I <id-vers>]
[--compat | -C]
[--keyfile=<keyfile> | -f <keyfile>]
π DESCRIPTION π
okay so here's the tea: this command takes a NVMe TLS configured PSK in the PSK interchange format NVMeTLSkey-1:<hmac>:<base64-encoded data>:, derives a retained PSK from it and the given host NQN using the HKDF-Expand-Label algorithm from RFC 8446, derives the TLS PSK from that, and stores the result into the specified keyring. like, it's giving β¨ derivation energy β¨
the TLS PSK is stored with the identity NVMe0R<hmac> <host NQN> <subsystem NQN> (for identity version 0) or NVMe1R<hmac> <host NQN> <subsystem NQN> <PSK digest> (for identity version 1). so you know exactly where it lives. iconic.
π¨ bestie, once the TLS PSK is stored in the keyring the configured PSK it was derived from cannot be retrieved from the keyring. like, gone. poof. π so don't lose the original, fr fr.
and the way that both NQNs are inputs to the TLS PSK itself, not just to the identity it's stored under? that's the tea. the host NQN comes in through the retained PSK derivation, and then both NQNs come in again through the identity (identity version 0) or the PSK digest it embeds (identity version 1), which is literally the context of the TLS PSK derivation. no cap.
this command is for deriving a new TLS PSK from a configured PSK; it always needs a subsystem NQN (and, if not given, will look up the host NQN) to derive the TLS PSK and compute the identity to store it under. like, you can't skip the subsystem NQN, bestie. it's required. π¨
if both the key to store and the identity to store it under are already knownβfor example a line previously written by nvme-keys-export(1), or a KX-HMAC-CHAP secretβuse nvme-keys-import(1) instead, which stores the key as given under an explicit identity, deriving neither. so like, if you already have both, don't use this one, use that one. iykyk.
if --keydata is not given the configured PSK is read from stdin, which also allows reading it from a file, e.g. nvme keys insert-tls-psk -c <subsysnqn> < keyfile. so convenient, bestie. π«Ά
to check whether a key is already loaded without inserting it, use nvme-keys-check-tls-psk(1). it's like a vibe check for your keyring. β¨
π OPTIONS π
-k <name>,--keyring=<name>β Name of the keyring into which the TLS PSK should be stored. Default is.nvme. so if you don't specify, it goes into.nvme, okay? π-t <type>,--keytype=<type>β Type of the key under which the TLS PSK is stored. Default ispsk. like, that's the default keytype, bestie.-n <nqn>,--hostnqn=<nqn>β Host NVMe Qualified Name (NQN) to be used for the retained PSK derivation and for the identity the TLS PSK is stored under. Defaults to the host NQN of the system, read from/etc/nvme/hostnqnor, if that file does not exist, generated from the host ID. so it's like, it knows your host NQN, but you can override it. π-c <nqn>,--subsysnqn=<nqn>β Subsystem NVMe Qualified Name (NQN) to be used for the identity the TLS PSK is stored under. Required. like, you literally can't skip this one, bestie. π¨-d <key>,--keydata=<key>β Configured PSK to derive the TLS PSK from. If not given, it is read from stdin. so you can pipe it in, no cap.-I <id-vers>,--identity=<id-vers>β TLS PSK identity version to be used;0(the default) is obsolete and defined in the NVMe TCP Transport Specification 1.0,1is TLS 1.3 with the PSK digest in the TLS PSK identity. so0is like, old news, but it's the default.1is the new hotness. π₯-C,--compatβ Use the original non-RFC 8446 compliant algorithm when deriving the retained PSK and the TLS PSK for compatibility with older implementations. like, for the old heads. π΅-f <keyfile>,--keyfile=<keyfile>β Append the identity of the TLS PSK, and the TLS PSK itself in PSK interchange format, tokeyfile. so it writes it out for you. cute.
π¦ GLOBAL OPTIONS π¦
these are defined at the top-level nvme command and are available to this subcommand, so you can use them here too, bestie:
--dry-runβ Print the command that would be executed, but do not actually execute it. like a dress rehearsal. π--no-ioctl-probingβ Disable probing for 64-bit IOCTL support. you know, for the nerds.--no-retriesβ Disable retry logic on transient errors. so like, no do-overs.-o <fmt>,--output-format=<fmt>β Set the reporting format tonormal,tabular,'json, orbinary. Only one output format may be used at a time. yes, that's a stray quote beforejsonβwe don't know why, but we respect it. π--output-format-version=<version>β Select the output format version. Version 1 uses the original field naming, while version 2 (default) provides more consistent and script-friendly field names. Other versions are rejected. so v2 is the default and it's the one you want. β--quietβ Suppress informational messages. Errors are still reported, and--quietcancels any--verbosefor the library log level. so it's like, shhh. π€«--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. you know, for the nerds. π§--timeout=<ms>β Set the timeout for the command in milliseconds.infiniteor-1waits without a time limit (0xffffffff). so if you want to wait forever, you can. β³-v,--verboseβ Increase the level of detail in the output. May be specified multiple times to further increase verbosity. like, the more you say it, the more it says. π£οΈ
these options can also be set as machine-wide defaults in nvme-cli.conf(5). A command-line flag always overrides the file. so the file is like the default vibe, but the command line is the main character. π
π EXAMPLES π
No Examples. literally none. not a single one. π the manpage says "No Examples" and we respect that.
π NVME π
Part of the nvme-user suite. periodt. π
that's the whole page, bestie! this is from the NVMe manual, dated 10/30/2026, and it's page NVME-KEYS-INSERT-(1). slay, you're welcome π β¨
π¦ 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