# Security keys, smart cards and the SSH agent

> Use a key that cannot be copied — a security key, a smart card, a password manager — through this computer's SSH agent, asked only when you sign in.

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

## In short

- A key that cannot be copied into HiveBoard is used through this computer's SSH agent, chosen as the server's key.
- The agent is asked only in a sign-in you start (a test, or Connect on the sign-in sheet), so such a server never connects by itself.
- HiveBoard waits a minute and a half for a touch or an approval, then gives the sign-in up.
- A server that is not set to use the agent never has the agent consulted.

Some keys cannot be put into HiveBoard's keychain because they cannot be copied at all: a security key (FIDO) that signs only when you touch it, a smart card, a key that a password manager keeps. The way to them is the *SSH agent* — a program on your computer that holds keys and signs with them on request. HiveBoard can ask the agent to sign, and the key never leaves it.

In the server's **Key** list, choose **This computer's SSH agent — security keys, smart cards, password managers**. It goes with the **SSH key** and **Key + code** sign-in choices.

## Setting a server to use the agent

- **When adding a server**: on the **Sign-in** step choose **SSH key** (or **Key + code**), then pick the agent in the **Key** list. Press **Test connection** and touch or approve when asked.
- **For a server you have**: open it in Connections, go to the **Connection** tab, pick the agent in the **Key** list and press **Save changes**.

The agent is offered for a server added with its address. A server that is still a host from `~/.ssh/config` does not offer it until you press **Make it self-contained** on its **Connection** tab.

## Signing in

Such a server always waits for you: its chip in the top bar says **Sign in** (or **Signed out**), and HiveBoard never connects to it by itself. A signature may need you, and a reconnect in the background would make a security key blink — or a password manager ask — with nobody having asked for anything.

1. Click the server's chip, or **Sign in** on its page in Connections.
2. The sign-in sheet has nothing to type. Press **Connect**. (For **Key + code** it also asks for the code, and the button is **Sign in**.)
3. While the button says **Waiting for the agent…**, touch the security key when it blinks, or approve the request the password manager shows.

HiveBoard waits a minute and a half for the touch or the approval. Then the sign-in ends and says so ("the wait for the SSH agent ran out").

## Where HiveBoard looks for the agent

| Situation | The agent used |
|---|---|
| `SSH_AUTH_SOCK` is set | that agent, and no other |
| Windows, nothing set | the *OpenSSH Authentication Agent* service, and a running Pageant (PuTTY 0.75 or later) |
| Linux or macOS, nothing set | none: HiveBoard says `SSH_AUTH_SOCK` is not set |

With both the Windows agent and a Pageant running, the keys of both are offered, the system agent's first. Pageant is found by itself: there is nothing to set.

### When the agent cannot help

- "no SSH agent answered at … — is one running?" — start the agent (on Windows, the OpenSSH Authentication Agent service, or Pageant).
- "the SSH agent on this computer holds no keys" — add the key to it (`ssh-add`, or Pageant's *Add Key*), or plug in the security key.

## What HiveBoard promises

- **Never asked by itself.** The agent is consulted for a server set to use it, in a sign-in you started, and at no other time.
- **Other servers never see it.** A server not set to use the agent never has the agent consulted.
- **Identity first.** The server's identity is checked before any key is offered, as for every server.

> [!NOTE]
> Such a server is self-contained in everything but its key. If you carry HiveBoard to another computer (see [Portable mode](/docs/settings/portable-mode)), that computer's agent must hold the key too.

HiveBoard has been tried with a software security key and a software smart card held by OpenSSH's own `ssh-agent`, and with PuTTY's Pageant. A physical security key or card has not been tried yet.

## Check yourself

1. When does HiveBoard ask the SSH agent to sign for a server set to use it?
   - On every refresh, every 20 seconds
   - Only in a sign-in you started: a test, or Connect on the sign-in sheet ← the answer
   - Once at start-up
   Why: The agent is consulted only in a sign-in you started, so a security key never blinks with nobody having asked for anything.

2. A server uses the key in your keychain, not the agent. Does HiveBoard show it the agent's keys too?
   - Yes, the agent's keys are offered first
   - Only if the keychain key is refused
   - No, a server not set to use the agent never has it consulted ← the answer
   Why: The agent is used only for a server whose key is set to this computer's SSH agent.

## Try it in the app

- In the add-server wizard, open the **Key** list on the Sign-in step and find the SSH agent entry.
- If you keep a key in an agent, set a test server to use it, press **Test connection**, and approve the request when the agent asks.

## Related

- [Keys from PuTTY and WinSCP](https://hiveboard.dev/docs/keys/putty-keys.md)
- [Sign-in methods](https://hiveboard.dev/docs/connections/sign-in-methods.md)
- [Signing in to a server](https://hiveboard.dev/docs/connections/sign-in-sheet.md)
- [Portable mode](https://hiveboard.dev/docs/settings/portable-mode.md)
- [How sign-in is kept safe](https://hiveboard.dev/docs/safety/sign-in-safety.md)
