# Kerberos

> Sign in to a cluster that takes only a Kerberos ticket: your Kerberos password goes to the realm, never the cluster; the realm; what each build can use.

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

## In short

- A Kerberos server is added like any other; HiveBoard offers Kerberos when the server says it takes tickets.
- In the single-file app you type your Kerberos password on the sign-in sheet, and HiveBoard gets a ticket from your realm with it — or uses a ticket file that kinit wrote.
- The Kerberos password goes to the realm's own servers, never to the cluster, and is not stored.
- A Kerberos server never connects by itself; its host key is still checked, and your ticket is not handed on to it.

Some sites let nobody in by key or by password: the login node takes a Kerberos *ticket* and nothing else. A ticket is proof, issued by your site's Kerberos servers (the *realm*), that you are who you say. HiveBoard can sign in with one.

In the single-file app, you type your **Kerberos password** on the sign-in sheet. HiveBoard asks your realm's servers for a ticket with it. The password goes to them, never to the cluster, and is not stored. If this computer already holds a ticket in a file — you ran `kinit` — leave the password empty.

## Adding a Kerberos server

1. In Connections, press **Add server** and type the server's address and your username.
2. Press **Check server**. Under **So far**, **Lets people in with** lists *Kerberos tickets* when the server takes them. No credential is sent at this step.
3. On the **Sign-in** step choose **Kerberos**. It is offered only for a server that takes tickets, and marked *recommended* when nothing else gets in.
4. Type your **Kerberos password** (optional), and the **Realm** only if it is not the one shown.
5. Press **Test connection**, then finish as for any server.

To switch a server you already have, choose **Kerberos** under **Sign-in** on its **Connection** tab. Kerberos is for a server added with its address: a host that is still an alias from `~/.ssh/config` must first be made self-contained (**Make it self-contained**). A Kerberos server has no key — choosing Kerberos lets the keychain key and the agent go.

## Signing in

A Kerberos server never connects by itself. Its chip says **Sign in**; click it and the sheet opens:

1. Type your password under **Kerberos password** — or leave it empty if this computer holds a ticket file.
2. Press **Sign in**. The button says **Getting in with a ticket…** while it works.

With the password, the ticket is asked for under the username you gave for the server. If the server asks something more after the ticket — a code, say — the sheet asks you, as for any server.

## Where the ticket comes from

| The ticket | Single-file app | Python build |
|---|---|---|
| Got with the Kerberos password | yes | no |
| A ticket **file** (`kinit` on Linux; `KRB5CCNAME=FILE:…`) | yes | yes |
| Windows logon, macOS cache, kernel keyring, KCM | no | yes |

On Windows, and on a Mac, the single-file app cannot use the ticket the system keeps for you: type the Kerberos password there.

## The realm

Two realms are in play, and they are often the same:

- **Yours** — where a ticket is asked for with your password: the one set for the server; else this computer's default realm, as `kinit` would; else the realm its Kerberos configuration names for the server; else the server's domain in capitals (`cedar.example.edu` → `EXAMPLE.EDU`).
- **The server's** — what `krb5.conf`'s `[domain_realm]` names for it (another realm, reached across a trust), and otherwise yours.

The **Realm** field shows the realm the address implies. Leave it empty unless yours is different — for example `HPC.EXAMPLE.EDU`.

The realm's servers are found in a `krb5.conf` if this computer has one (`KRB5_CONFIG`, `/etc/krb5.conf`; on Windows `krb5.ini` under `ProgramData\MIT\Kerberos5` or in the Windows folder), and otherwise in DNS.

## What HiveBoard promises

- **The Kerberos password never goes to the cluster.** It is a field of its own in every request, apart from anything that answers a server's questions. A Kerberos server is sent nothing else you typed either.
- **Only when you start it.** A ticket is used for a server marked Kerberos, in a sign-in you started, and at no other time. The realm is asked only once the server has said it takes Kerberos.
- **The server proves itself.** The login is signed only after the server has shown it could read the ticket.
- **The host key is still checked**, as for any server. The Kerberos key exchange, which would replace that check, is not used.
- **Your ticket stays here.** It is not handed on to the server (no delegation).

## When it fails

The sheet says what went wrong, for example:

- "the Kerberos password was not accepted by EXAMPLE.EDU"
- "EXAMPLE.EDU knows no such user" — check the username
- "this computer's clock and EXAMPLE.EDU's differ by more than Kerberos allows — set the clock"
- "the Kerberos servers of EXAMPLE.EDU could not be reached"
- "this computer holds no Kerberos ticket that HiveBoard can read — type your Kerberos password and it will get one"
- "the Kerberos realm of this server is not known — set it in the server's settings"

The single-file app's Kerberos has been tried against MIT Kerberos (also across two realms joined by a trust), Heimdal, and an Active Directory domain served by Samba. It has not been tried against Microsoft's own Active Directory or on macOS.

> [!BUILD]
> The Python build signs in with the ticket your system already holds — on Windows, the one you got by signing in to the domain — and cannot get one with a password: run `kinit` first. Its sheet has nothing to type, only **Connect**. It needs the `gssapi` package (Linux, macOS) or `pywin32` (Windows), and says so when they are missing. It leaves both realms to the system's Kerberos, as `ssh` does.

## Check yourself

1. Where does the Kerberos password you type on the sign-in sheet go?
   - To the cluster, as your SSH password
   - To your realm's Kerberos servers, for a ticket, and then it is discarded ← the answer
   - Into HiveBoard's data folder, so you need not type it again
   Why: The Kerberos password is a field of its own; it goes to the realm's servers for a ticket and is never sent to the cluster or stored.

2. You are on Windows, signed in to your university's domain. Can the single-file app use that logon ticket?
   - Yes, it picks it up by itself
   - No; type your Kerberos password on the sign-in sheet instead ← the answer
   - Only after you set the realm
   Why: A ticket that only the system's own Kerberos can reach — the Windows logon session, the macOS cache — is out of the single-file app's reach; the Kerberos password is the way in.

## Try it in the app

- When you add a server, read the **Lets people in with** list under **So far** after **Check server**, and see whether it names Kerberos tickets.
- For a Kerberos server, open its **Connection** tab and read which realm the **Realm** field names as the one its address implies.

## Related

- [Sign-in methods](https://hiveboard.dev/docs/connections/sign-in-methods.md)
- [Adding a server](https://hiveboard.dev/docs/connections/add-a-server.md)
- [The single-file app and the Python build](https://hiveboard.dev/docs/start/two-builds.md)
- [How sign-in is kept safe](https://hiveboard.dev/docs/safety/sign-in-safety.md)
- [Trusting a server's identity](https://hiveboard.dev/docs/connections/server-identity.md)
