kkeyroost

Learn · Naming your keys

Give your keys names

Own more than one security key? Attach a memorable label to each — a "signing-yubikey", a "backup", a "work" key — so keyroost recognizes it by name instead of a cryptic device path that changes every time you unplug and replug it.

Why name a key?

If you keep two or three keys plugged in — or rotate a primary and a backup — they all look alike to the operating system, and the path the OS assigns each one (/dev/hidraw3 today, /dev/hidraw5 tomorrow) shifts on every replug. A friendly name fixes that: keyroost matches it to the key's stable serial number, so "signing-yubikey" always means the same physical key no matter which port it's in.

This makes the device list easier to read at a glance, and it lets you target a specific key on the command line with --name instead of hunting for the right path.

How keyroost identifies a key

A name is bound to the key's serial number, not to a port or a slot:

Either way, matching is a plain string comparison against that serial — so a named key is recognized the moment it's connected, in any port, and is shown as "not connected" when it's absent.

Naming is opt-in and stays on your computer

Nothing is written to disk until you explicitly add a name. When you do, keyroost saves an entry to a local keys.json file on this computer — the friendly label plus the key's serial number — so the key can be recognized later. Merely viewing or matching keys records nothing, and you can remove an entry at any time.

Naming a key in the app

In the keyroost desktop app, select the key you want to label and use the Name this key action next to its title (it reads Rename once a name is already set). Type a short label and confirm — the key then appears under that name in the device list, and keeps it across replugs.

Naming a key from the command line

The same registry is available from keyroostctl through the key-name command, which has three subcommands:

keyroostctl key-name add signing-yubikey
keyroostctl key-name list
keyroostctl key-name remove signing-yubikey

Once a key is named, commands that target a single key accept --name signing-yubikey to pick it out, instead of a device path that changes between plugs.

Label rules

A label is 1–64 characters of lowercase letters, digits, hyphens, and underscores ([a-z0-9_-]). Names must be unique, and each serial can carry only one name — keyroost refuses a duplicate name or a second name for the same key.

What keyroost stores

k

A small keys.json registry on this computer: for each named key, the label, the serial number, and how that serial was obtained (USB or CCID). Naming is pure local config and matching — keyroost never enumerates or contacts a server to do it, and removing a name deletes the entry. No secrets, PINs, or credentials are ever part of a name.

Related

Naming works alongside everything else a key can do: