# 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.

Source: https://hiveboard.dev/docs/connections/server-identity · Section: Servers and connections · HiveBoard 0.1.7 · Updated 2026-10-19

## 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](/docs/settings/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](/docs/help/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.

1. Ask the cluster's administrators whether the server was re-keyed, and for its new
   fingerprint.
2. Open the server's **Connection** tab and, under **Server identity**, press **Forget trusted
   key…**
3. Read the confirmation and press **Forget the key**.
4. 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.

> [!WARNING]
> At the next connection HiveBoard trusts whatever key the server presents, and remembers it. A
> key that changes for no reason is exactly what an impostor looks like: forget a key only when
> you know the server was re-keyed.

## Check yourself

1. When does HiveBoard compare a server's host key with the one on record?
   - Before any password, code or key is offered ← the answer
   - After you have signed in
   - Only when you press Check server
   Why: A changed, revoked or uncheckable identity is refused before any credential is offered, so an impostor gets nothing.

2. What does Forget trusted key… change?
   - Only HiveBoard's own known_hosts, keeping a copy of the old one ← the answer
   - Your ~/.ssh/known_hosts
   - The host key on the server
   Why: 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

- Open a server's **Connection** tab and read **Server identity**: is it trusted by HiveBoard since its first visit, or through `~/.ssh/known_hosts`?

## Related

- [Its identity changed](https://hiveboard.dev/docs/help/identity-changed.md)
- [A server's page and its tabs](https://hiveboard.dev/docs/connections/server-tabs.md)
- [How sign-in is kept safe](https://hiveboard.dev/docs/safety/sign-in-safety.md)
- [The data folder](https://hiveboard.dev/docs/settings/data-folder.md)
- [Adding a server](https://hiveboard.dev/docs/connections/add-a-server.md)
