Skip to content
Edith

Docs

Command reference

ed machines host-keys

Inspects the host-key fingerprints saved for a machine without opening an SSH connection, and optionally compares a SHA256 fingerprint you obtained through a trusted channel, such as the server's console.

Output
ed machines host-keys <machine> [--fingerprint <SHA256:...>] [--json]

Arguments

Name Type / values Default What it does
<machine> string, required none Saved machine name, SSH alias or id.

Options

Name Type / values Default What it does
--fingerprint SHA256: followed by 43 base64 characters none Fingerprint to compare with the saved records.
--json flag off Emit the report as JSON.
--help, -h flag off Print the help for this command and exit 0.

Behaviour

The command resolves the machine the same way Machines connects: its SSH config alias or its manual host, port and user. ssh -G reports the effective host name, port and HostKeyAlias, and ssh-keygen -F looks the name up in Edith's known-host file, your ~/.ssh/known_hosts and the global known-host files. Hashed entries and [host]:port names for non-default ports work through OpenSSH's own lookup. Nothing is added, replaced or removed, and no network key scan runs. Both tools run with a fifteen second deadline.

JSON holds lookup, status, observed, records and notes. Each record has file, line, algorithm, fingerprint and marker (empty, CA or REVOKED). observed is null when you supplied no fingerprint.

Status Meaning
saved Saved records were found and no fingerprint was supplied.
match The supplied fingerprint equals an unmarked saved key.
mismatch The supplied fingerprint differs from every unmarked saved key.
notFound No saved record exists for the host.
revoked A saved revoked key has the supplied fingerprint.
authority Only certificate authority records were found.

A finished review exits 0 for every status, so read status when scripting. A malformed fingerprint, an unresolved SSH configuration or an unreadable record exits 1. An unknown machine exits 3. Fingerprint equality is not a trust decision. KnownHostsCommand, IP address records and certificate validity are outside this file review.

In the app, the shield button in a machine's header opens Host keys with the same records, copy buttons and a comparison field. When SSH rejects a changed key, the connection error names the fingerprint SSH reported and the sheet starts with it filled in.

Examples

Output
ed machines host-keys boxed machines host-keys box --fingerprint 'SHA256:BwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwc' --json