Skip to content

lemano

Discover Linux servers over SSH and keep their history

Description

Lemano discovers the state of Linux servers over SSH, without installing
anything on them, and keeps it as numbered, hash-chained generations in a
local encrypted store. It shows what changed and verifies the history.
Only lemano revert writes on a server: it puts files and kernel
parameters back to how a generation recorded them (and lemano target
end-trial finishes a trial a revert left).

Exit codes:
  0    success
  1    other error; a revert cancelled, or a trial not kept
  2    usage: unknown command or flag, missing argument, invalid selector
  3    connection: a target could not be reached (also the fresh login
       after a revert trial's write)
  4    host identity: unknown or changed host key, fingerprint mismatch,
       or a changed machine identity
  5    lock held: another command holds a target's lock
  6    integrity: the recorded history does not verify
  7    partial: a pass completed but could not read everything (on a
       target with privilege: user, what it cannot read for lack of
       privilege is skipped (needs root) and does not count); also
       revert, when a change was not applied (a file changed since the
       preview, a failed validation); programs that extend lemano use it
       for their own partial results
  8    changed: only with --detailed-exitcode: discover, when at least one
       generation was written and nothing failed; summary, when at least
       one target needs attention
  9    confirmation required: a revert that would write has nobody to
       approve it (no terminal, or -o json); it showed its plan, wrote
       nothing, and the error holds the command that approves it
  130  interrupted
With several targets the highest failure code is returned, and a failure
always takes precedence over 8. New codes may be added;
treat any code not listed here as a failure.

Synopsis

lemano

Examples

lemano init
lemano discover -f targets/
lemano diff web-07 0 1

Flags

FlagTypeDefaultDescription
--log-levelstringwarnlog level on standard error: debug, info, warn or error
--no-colornever colour the text (colour is also off when $NO_COLOR is set, when $TERM is dumb and when the output is not a terminal; $FORCE_COLOR turns it on, over $NO_COLOR)
--password-promptask on the terminal for the login password of each target whose file names none
--ssh-configstringssh configuration file that targets’ connection settings are read from, or none to read none (default $LEMANO_SSH_CONFIG, else the files ssh reads)
--storestringpath of the store (default $LEMANO_STORE, else $XDG_DATA_HOME/lemano/lemano.db)
--sudo-password-promptask on the terminal for the sudo password of each target whose file names none

Exit codes

See exit codes.

See also

  • lemano baseline: Accept a generation as a target’s baseline
  • lemano diff: Show what changed between two generations of a target
  • lemano discover: Run a discovery pass on targets
  • lemano history: Show a target’s generations, and its passes and blind windows
  • lemano init: Create the store and its key
  • lemano revert: Put a target’s files and kernel parameters back to how a generation recorded them
  • lemano secret: Store passwords and keys in Lemano’s encrypted store
  • lemano state: List, show and export the recorded state of a target
  • lemano summary: Show what changed on your servers, who did it, and what needs you
  • lemano target: List and show targets, re-pin a host key, confirm a new identity or end a trial
  • lemano unlock: Release a target’s lock left by a command that is gone
  • lemano verify: Check a target’s hash chain
  • lemano version: Print the version of Lemano and of its formats