lemano target rekey
Pin a target’s new host key, given its exact fingerprint
Description
Replace the host key pinned for a target with the key it presents now, but
only if that key's fingerprint is exactly the one given. Get the
fingerprint from a trusted channel, for example by running
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub on the host's console.
The target's connection settings come from the copy the store keeps from
its last discover, or from the target files with -f, with the settings it
leaves out read from your ssh configuration as discover reads them.
With --jump, the key re-pinned is that of one of the target's jump hosts,
named as host:port (or host, for port 22) as discover's error shows it.
The jump hosts before it must present their pinned keys.
A new host key and a new machine ID are confirmed separately: if the
machine was reinstalled, the next discover also reports IdentityChanged,
to be confirmed with lemano target confirm-identity.Synopsis
lemano target rekey NAME --fingerprint SHA256:...Examples
lemano target rekey web-07 --fingerprint SHA256:Qx3...
lemano target rekey web-07 --jump bastion.example.com:22 --fingerprint SHA256:k9T...Flags
| Flag | Type | Default | Description |
|---|---|---|---|
-f, --filename | string | read the target from this file or directory instead of the store | |
--fingerprint | string | the new host key’s SHA-256 fingerprint, as ssh-keygen -l prints it | |
--jump | string | re-pin this jump host of the target (host:port) instead of the target itself |
Flags inherited from parent commands
| Flag | Type | Default | Description |
|---|---|---|---|
--log-level | string | warn | log level on standard error: debug, info, warn or error |
--no-color | never 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-prompt | ask on the terminal for the login password of each target whose file names none | ||
--ssh-config | string | ssh configuration file that targets’ connection settings are read from, or none to read none (default $LEMANO_SSH_CONFIG, else the files ssh reads) | |
--store | string | path of the store (default $LEMANO_STORE, else $XDG_DATA_HOME/lemano/lemano.db) | |
--sudo-password-prompt | ask on the terminal for the sudo password of each target whose file names none |
Exit codes
See exit codes.
See also
- lemano target: the parent command