Trusting a server's identity
How HiveBoard knows it reached the real server: the host key kept from the first visit, a changed key refused, host certificates, and Forget trusted key.
In short
- The first time HiveBoard connects to a server it remembers the server's host key in its own known_hosts; a different key later is refused.
- The check comes before any password, code or key is offered, so a machine pretending to be your cluster gets none of them.
- ~/.ssh/known_hosts is read but never written, and a host certificate is trusted only when an authority for that server is on record.
- Forget trusted key… on the Connection tab is for a server you know was re-keyed.
Every SSH server has a host key — a key pair of its own that it proves it holds each time
anything connects. Its fingerprint, a short string such as SHA256:…, is how you recognise the
server. HiveBoard remembers that key the first time it connects to a server, and from then on
refuses to talk to anything that answers on the server’s address with a different one. This is
what stops your password, your codes and your key’s signature from ever reaching a machine
pretending to be your cluster.
The first visit, and every visit after
Check server, in Add a server, reads the server’s host key and shows its fingerprint under So far, with what HiveBoard makes of it: Known to this computer, First visit — trusted when you connect, Not the identity on record, or Vouched for by a certificate authority on record. The check sends no password and writes nothing down.
The first real connection — the connection test, or your first sign-in — remembers the key in
HiveBoard’s own known_hosts, in its data folder. After that,
every connection compares what the server presents with the record:
| The record says | Result |
|---|---|
| This key is on record | Known: connect |
| Nothing about this server | New: remember the key, connect |
| A different key is on record | Changed: refuse |
The key is on an @revoked line | Refused |
| A host certificate that cannot be checked | Refused |
Only a new server is ever written down, and only ever as a plain key. HiveBoard also reads
~/.ssh/known_hosts, so a server your terminal already knows is known here too — but it never
writes to that file. And it asks a server first for the kinds of key already on record for it,
as OpenSSH does, so that a server whose only recorded key is an Ed25519 one is not mistaken
for a changed one.
The check applies to every connection: a server added with its address, an alias from
~/.ssh/config, a jump server, a key install.
Why it protects your password and codes
The identity is checked before anything is offered to sign in. A changed key, a revoked key or a certificate that cannot be checked ends the connection there: no password, no one-time code, no key signature has been sent. A machine that has taken over the server’s address learns nothing it could use. What to do when it happens is on Its identity changed.
Where to see it
A server’s Connection tab has a Server identity card:
- Key — the type of the host key and its fingerprint.
- Trusted — how: By HiveBoard, since its first visit, Through this computer’s ~/.ssh/known_hosts, or Vouched for by a certificate authority on record.
A server not reached since HiveBoard started may say Not seen yet in this session — it is checked the next time HiveBoard connects. The Diagnostics tab shows the host key on record too.
Servers that sign their host keys
Many sites give their login nodes a host certificate: the site’s own authority signs each
node’s host key, so you trust the authority once instead of each node. HiveBoard asks a server
for its certificate only when an authority for that server is on record — a line like this in
HiveBoard’s own known_hosts or in ~/.ssh/known_hosts:
@cert-authority *.example.edu ssh-ed25519 AAAA…
For a port other than 22, write the pattern as [host]:port. The certificate is then checked —
the authority, the host name, the dates — and the server needs no entry of its own. A
certificate from an authority that is not on record, made out to another host, or run out is
refused. With no authority on record, HiveBoard asks for the server’s plain key instead, which
every SSH server also offers, and remembers that.
Forget trusted key…
A server’s key does change for honest reasons: an upgrade or a reinstall can give it a new one. When you know that happened, tell HiveBoard to forget the old key.
- Ask the cluster’s administrators whether the server was re-keyed, and for its new fingerprint.
- Open the server’s Connection tab and, under Server identity, press Forget trusted key…
- Read the confirmation and press Forget the key.
- After the next connection, compare the fingerprint the card shows with the one the administrators gave you.
Only HiveBoard’s own known_hosts is edited; the old file is kept beside it as
known_hosts.old. ~/.ssh/known_hosts is never touched — if it still lists the server,
HiveBoard tells you, so you can remove that entry yourself if it is the stale one.
Check yourself
2 quick questions on this page. Nothing is sent anywhere.
-
When does HiveBoard compare a server's host key with the one on record?
- Before any password, code or key is offered
- After you have signed in
- Only when you press Check server
Show the answer
Before any password, code or key is offered A changed, revoked or uncheckable identity is refused before any credential is offered, so an impostor gets nothing.
-
What does Forget trusted key… change?
- Only HiveBoard's own known_hosts, keeping a copy of the old one
- Your ~/.ssh/known_hosts
- The host key on the server
Show the answer
Only HiveBoard's own known_hosts, keeping a copy of the old one Only HiveBoard's own known_hosts is edited, with the old file kept as known_hosts.old; ~/.ssh/known_hosts is never touched.
Try it in the app
On your own computer, with HiveBoard open. Tick them off as you go.
Related
Written for HiveBoard 0.1.7, the version on the download page. Examples use a made-up cluster (Ember) and person (zoe). Something here not what you see? Report it from the app.