gshsec(8)

gshsec8

Control utility for shared secret devices

Usage

gshsec label [-hv] name prov prov ...

gshsec stop [-fv] name ...

gshsec clear [-v] prov ...

gshsec dump prov ...

gshsec [--libxo] list

gshsec [--libxo] status

gshsec load

gshsec unload

Overview

The gshsec utility is used for setting up a device which contains a shared secret. The secret is shared between the given providers. To collect the secret, all providers are needed. If one of the components is missing, there is no way to get any useful data from the rest of them. The first argument to gshsec indicates an action to be performed:

label

Set up a shared secret device from the given components with the specified name. Metadata are stored in the last sector of every component.

stop

Turn off an existing shared secret device by its name. This command does not touch on-disk metadata!

clear

Clear metadata on the given providers.

dump

Dump metadata stored on the given providers.

list

See geom(8).

status

See geom(8).

load

See geom(8).

unload

See geom(8).

--libxo

Generate output via libxo(3) in a selection of different human and machine readable formats. See xo_options(7) for details on command line arguments.

Additional options:

-f

Force the removal of the specified shared secret device.

-h

Hardcode providers' names in metadata.

-v

Be more verbose.

Exit status

Exit status is 0 on success, and 1 if the command fails.

Examples

The following example shows how to create a shared secret device. The secret will be split between a slice on a local disk and a USB Pen drive.

gshsec label -v secret /dev/ada0s1 /dev/da0
newfs /dev/shsec/secret

From now on, when the USB Pen drive is inserted, it will be automatically detected and connected, making the secret available via the /dev/shsec/secret device.

Releases

51 releases since FreeBSD 5.4-RELEASE; the text changed 36 times.

  1. 5.4–5.5
  2. 6.0–6.3
  3. 6.4
  4. 7.0
  5. 7.1
  6. 7.2
  7. 7.3
  8. 7.4
  9. 8.0
  10. 8.1
  11. 8.2
  12. 8.3
  13. 8.4
  14. 9.0
  15. 9.1
  16. 9.2
  17. 9.3
  18. 10.0
  19. 10.1
  20. 10.2
  21. 10.3
  22. 10.4
  23. 11.0
  24. 11.1
  25. 11.2
  26. 11.3
  27. 11.4
  28. 12.0
  29. 12.1
  30. 12.2
  31. 12.3
  32. 12.4
  33. 13.0–13.2
  34. 13.3–14.4
  35. 14.5
  36. 15.0–15.1
  37. 16.0

--libxo since FreeBSD 16.0-CURRENT (2026-10-27).

History

The gshsec utility appeared in FreeBSD 5.4.

Authors

Pawel Jakub Dawidek ⟨[email protected]⟩

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.