# The keychain

> HiveBoard's own SSH keys, kept in its data folder: create an Ed25519 or RSA key, import one, copy its public half, install it, rename or delete it.

Source: https://hiveboard.dev/docs/keys/keychain · Section: Keys and sign-in · HiveBoard 0.1.7 · Updated 2026-10-19

## In short

- The keychain holds the SSH keys HiveBoard signs in with, in the keys folder of its data folder; private keys never leave that folder through the app.
- New key makes an Ed25519 key, or RSA 4096 for older servers; leave the passphrase empty and HiveBoard can connect unattended.
- Import key takes an OpenSSH, PEM or PuTTY key, pasted or from a file, and the keys already in ~/.ssh are listed for one-click import.
- A key that a server uses cannot be deleted until that server has another key.

An SSH key is a pair: a private half that stays with you, and a public half that you put on the
server. The keychain is where HiveBoard keeps its own keys — in the `keys` folder of its
[data folder](/docs/settings/data-folder). A server that signs in with one of them is
self-contained: carry the data folder to another computer, and the key goes with it.

Open it from Connections: **Keychain** is under *HiveBoard*, below the list of servers. Its
page has two buttons at the top, **New key** and **Import key**, and a card for every key.

## A key's card

- **Its name.** Click the name to rename it; <kbd>Enter</kbd> keeps the new name and
  <kbd>Esc</kbd> keeps the old one.
- **What it is**: its type (Ed25519, RSA 4096, ECDSA), *passphrase-protected* if it has a
  passphrase, and whether it was generated or imported, and when.
- **Its fingerprint**, the `SHA256:…` string that identifies it.
- **Its certificate**, if it has one (see [SSH certificates](/docs/keys/certificates)).
- **Used by** and the servers that sign in with it — or *Not used by any server yet*.
- The buttons **Copy public key**, **.pub**, **Install on a server…** and **Add certificate…**,
  and a bin to delete it.

## Creating a key

1. Press **New key**.
2. Give it a **Name**.
3. Choose its **Type**: **Ed25519 — modern, recommended**, or **RSA 4096 — for older servers**.
4. Type a **Passphrase**, or leave it empty (*Leave empty to connect unattended*).
5. Press **Create key**.

The passphrase decides how the key behaves. Without one, HiveBoard can reconnect to a server on
its own. With one, the key is encrypted on disk, and a server that uses it waits for you to
unlock the key once per session — worth it if HiveBoard lives on a USB stick. A passphrase is
used only to unlock the key: it is never offered to a server as a password.

You do not always have to come here first. In **Add a server**, the key list starts with
**Create a new key for this server**, and a server's **Connection** tab has **Create a new key**,
which then offers to install it on that server.

## Importing a key

1. Press **Import key**.
2. Give it a **Name**, if you like.
3. Paste the key into **Private key**, or press **Choose a file…**. It can be OpenSSH, PEM or a
   PuTTY `.ppk` — the private file, the one *without* `.pub`.
4. If the key has a passphrase, type it under **Passphrase**. It is used to check the key and
   is not stored.
5. Press **Import**.

An OpenSSH or PEM key is kept exactly as you gave it — still locked, if it was. A PuTTY key is
kept in OpenSSH's format with the same passphrase, and your `.ppk` is not changed (see
[Keys from PuTTY and WinSCP](/docs/keys/putty-keys)). A public key is turned down with *That is a
PUBLIC key*, and a key that is already in the keychain is turned down with the name it has
there.

### Keys on this computer

Below your keys, **Keys on this computer** lists the keys in `~/.ssh` — `id_ed25519`, `id_rsa`,
`id_ecdsa`, and any key file your `~/.ssh/config` names. **Import** copies one into the keychain
and leaves the original untouched; a server that uses it can then be made self-contained. A
locked key asks for its passphrase and is copied still locked. A certificate beside the key
(the file ending in `-cert.pub`) comes along. A key already copied says **in keychain as** and
its name here.

## Sharing the public half

The public half is what a server needs, and it is not secret.

- **Copy public key** puts it on the clipboard, as one line — for `authorized_keys`, or for a
  web form where your site asks you to register a key.
- **.pub** downloads it as a file.
- **Install on a server…** puts it on a server for you, with your password, once (see
  [Installing a key on a server](/docs/keys/install-a-key)).

## Deleting a key

Press the bin on the key's card. A key that a server signs in with cannot be deleted: HiveBoard
names the server and asks you to give it another key first. Otherwise it asks for confirmation,
then deletes the private key from the folder. A server where you installed the key keeps the
public half in its `authorized_keys` until you remove it there — but without the private half,
nobody can use it.

## What is kept, and where

| File in `keys/` | What it is |
|---|---|
| `<id>` | The private key (mode `0600`) |
| `<id>.pub` | The public half |
| `<id>-cert.pub` | Its certificate, if any |
| `keys.json` | Names and dates, nothing secret |

The page above the cards names the folder. Private keys never leave it through the app: the
page sees a key's name, type, fingerprint and public half only, and an
[export](/docs/connections/export-import) carries the same and nothing more.

> [!NOTE]
> A key that cannot be copied at all — on a security key, a smart card, or in a password
> manager — does not go in the keychain. Choose **This computer's SSH agent** in a server's
> **Key** list instead (see [Security keys, smart cards and the SSH agent](/docs/keys/ssh-agent)).

## Check yourself

1. You want Ember to reconnect by itself after your laptop wakes up. Which key do you create for it?
   - A key with no passphrase ← the answer
   - A key with a passphrase
   - Any key — the passphrase makes no difference
   Why: Without a passphrase HiveBoard can reconnect on its own; with one, the key is encrypted and you unlock it once per session.

2. Ember signs in with your key "Laptop key". What happens when you try to delete that key?
   - HiveBoard refuses until Ember has another key ← the answer
   - The key is deleted and Ember switches to a password
   - The key is deleted here and removed from Ember too
   Why: A key a server uses cannot be deleted; give the server another key first.

## Try it in the app

- Open Connections → **Keychain**, press **New key**, create an Ed25519 key, and find its fingerprint on its card.
- Look under **Keys on this computer** and see which of your `~/.ssh` keys are already **in keychain**.

## Related

- [Installing a key on a server](https://hiveboard.dev/docs/keys/install-a-key.md)
- [Keys from PuTTY and WinSCP](https://hiveboard.dev/docs/keys/putty-keys.md)
- [SSH certificates](https://hiveboard.dev/docs/keys/certificates.md)
- [Security keys, smart cards and the SSH agent](https://hiveboard.dev/docs/keys/ssh-agent.md)
- [The data folder](https://hiveboard.dev/docs/settings/data-folder.md)
