Home / Docs / SSH Certificates

SSH Certificates

Teams plan

Give your team short-lived SSH certificates instead of shared keys. Each team gets its own certificate authority (CA). Your servers trust that CA instead of a list of keys, and every teammate's Servonaut picks up a certificate for the servers and Linux logins their role allows when they connect. Certificates expire within hours, and removing someone from the team revokes theirs.

Quick facts

Part of the Teams plan. The team owner switches it on. Every teammate needs Servonaut 2.30 or later on Linux or macOS and a Servonaut Vault set up on their computer. Servers need OpenSSH 8.2 or later.

How it works

  1. The owner switches it on. Servonaut creates two CAs for the team: a user CA that signs your teammates' certificates and a host CA that vouches for your servers.
  2. The owner decides who logs in as whom. Each team role gets a list of Linux logins, optionally different per server.
  3. An owner or admin enrolls each server. Their Servonaut configures the server's SSH daemon to trust the team's user CA and gives the server a host certificate.
  4. Teammates connect as usual. servonaut ssh <server>, or connecting from the app, gets a fresh certificate for that server and login. Nobody copies keys onto the server.
Where the keys live

The team's CA private keys are created and kept in a managed key service. They can't be exported, and they are never sent to your browser or to anyone's computer. The key a certificate is issued for belongs to your computer: its private half stays in your encrypted vault identity and is loaded only into a private, short-lived SSH agent while you connect.

Before you start

Your team

  • A Teams subscription on the team owner's account. Solo and Free plans don't include SSH certificates.
  • MFA on the owner's account, and on every owner's or admin's account that enrolls servers. Changes made from the Servonaut app or CLI need a Servonaut sign-in with MFA within the last 12 hours. On the website you confirm the change with MFA.
  • A Servonaut Vault on every computer that connects. Run servonaut vault setup once per computer, or use Vault → Setup in the app. See Servonaut Vault.
  • Servonaut 2.30 or later on Linux or macOS. Windows isn't supported yet: Servonaut can't start its private SSH agent there.

Your servers

  • OpenSSH 8.2 or later with an Ed25519 host key, managed by systemd.
  • sshd reads drop-in files from /etc/ssh/sshd_config.d/, as current Ubuntu and Debian releases do by default.
  • Root access: Servonaut connects as root or uses passwordless sudo.
  • A working SSH login from the enrolling person's Servonaut, for example a team vault key. Servonaut makes the changes over that login.
  • No other SSH CA setup on the server. If its sshd already sets TrustedUserCAKeys, AuthorizedPrincipalsFile or RevokedKeys, enrollment stops with foreign_ca_config and nothing is changed.

Switch on SSH certificates

Only the team owner can switch the CA on. Either:

  • on the website, open My Teams, choose the team, open the SSH access tab and click Enable SSH certificates; or
  • run servonaut ca enable --team <team>.

The SSH access tab then shows the user CA and host CA fingerprints. Owners, admins and members can see this tab. Keep it handy: it is the reference for checking fingerprints whenever Servonaut asks you to.

Nobody gets a login until you add one

A new CA gives no role any Linux login. Set up the logins (next section) before teammates try to connect.

Logins and policy

The owner sets the policy on the SSH access tab, under Certificate policy:

SettingWhat it does
Linux logins by team roleThe logins (for example deploy) that owners, admins, members and viewers may use, up to 16 per role. A role with no logins gets no certificates.
Per-server login overridesDifferent logins for one server. The override replaces the role logins on that server only.
Certificate lifetimesHow long a certificate lasts: Interactive for people connecting (8 hours for a new CA), Maximum for the longest a certificate may last (at most 16 hours), and Automation for short certificates without a terminal, such as the login check after enrollment (at most 10 minutes).
Source-address CIDRsOptional. Certificates then only work from these networks.
Permit port forwarding / agent forwardingOff unless you switch them on. X11 forwarding is never allowed.
Require MFA for membersOn for a new CA. Anyone requesting a certificate must have signed in to Servonaut with MFA within the last 30 days.

From a terminal, servonaut ca policy --team <team> shows the policy, and --set changes only the fields you give:

bash
$ servonaut ca policy --team <team> --set '{"role_logins": {"admin": ["deploy", "ubuntu"], "member": ["deploy"]}}'

Logins are written onto each server, so after you change them the affected servers need a refresh. The Host enrolment list marks them Refresh needed. Removing a login revokes the certificates that carry it straight away.

Enroll servers

Owners and admins enroll the team's shared servers. The work runs in your own Servonaut, over your existing SSH access. The website never logs in to your servers.

  • In the app: open SSH Certificates (under Tools in the sidebar), pick the team and server, and choose Enroll server.
  • From a terminal: servonaut ca enroll <server> --team <team>.
  • From the website: click Enrol in the Host enrolment list on the SSH access tab. This queues a job for your own Servonaut, which tells you when it's waiting. Carry it out with the command it shows, or list your waiting jobs with servonaut ca jobs --team <team>. A queued job that nobody has started can be cancelled there.

Before changing anything, Servonaut shows the server, the CA fingerprints, the logins and the files it will write, and asks you to type the server's host name. That's why enrolling needs an interactive terminal or the app. It can't run from a script.

What enrolling changes on the server

PathContents
/etc/ssh/servonaut/The team's user CA public key, one principals file per Linux login, and the revocation list.
/etc/ssh/sshd_config.d/50-servonaut.confPoints sshd at those files and at the host certificate. The file is marked as managed by Servonaut, so don't edit it by hand.
/etc/ssh/ssh_host_ed25519_key-cert.pubThe server's host certificate, signed by the team's host CA for the server's existing Ed25519 host key. It is valid for 365 days.

Existing authorized_keys logins and password settings are left alone. Enrollment adds certificate logins; it doesn't switch other logins off.

Servonaut checks the configuration with sshd -t and reloads sshd. It then proves that a certificate login works before reporting success. If any step fails, the server is rolled back to its previous setup and the command says rolled_back. If even the rollback fails, it says failed: check the server's SSH configuration with sshd -t before you rely on it.

servonaut ca refresh <server> --team <team> rewrites the CA keys, logins and revocation list and renews the host certificate. servonaut ca unenroll <server> --team <team> removes the configuration again. The Host enrolment list on the website shows each server's state and lets you queue either one.

Connecting

Nothing changes in how you connect. For a team server that is enrolled, servonaut ssh <server> and connecting from the app use a certificate automatically when your role has a login there. The CLI prints SSH resolution tier: ca, and the app says Connected (resolution tier: ca).

  • Which login. The shared server's login, or your role's only login on that server. If your role has several logins there and the shared server names none, ask an owner or admin to set its login.
  • Certificates are reused. Servonaut keeps a certificate (the public part only) under ~/.servonaut/certs/ and asks for a new one before it runs out.
  • The server is verified too. Servonaut accepts the server only if it presents a host certificate from your team's host CA. A server that can't prove who it is gets no connection.
  • No silent fallback. Once a certificate is used for a server, a failure stops the connection with the reason, for example this needs a recent MFA sign-in; run servonaut login and try again. Servonaut doesn't quietly switch to another key.

Revoking access

Servonaut revokes user certificates by itself when:

  • someone is removed from the team or leaves it, or becomes a viewer;
  • a role change or a policy change takes away a login;
  • one of their Servonaut devices is revoked, or a device's SSH key is replaced;
  • the owner disables issuance.

To revoke one certificate, find its serial in the Issuance log and run servonaut ca revoke <serial> --team <team> --note "reason".

Servers refuse a revoked certificate once they have the new revocation list. When the list changes, an owner's or admin's connected Servonaut delivers it to the enrolled servers automatically. servonaut ca krl --team <team> delivers it straight away. Every certificate also expires by itself: no user certificate lasts longer than 16 hours.

Disabling and deleting

Disable issuance on the SSH access tab stops new certificates and revokes the ones still valid. The servers keep their configuration, and enabling again reuses the same CAs. Deleting the team doesn't revoke anything: certificates already issued keep working until they expire. Unenroll your servers first.

Break-glass key

A break-glass key is an emergency root key for when certificate logins fail. Import it into the team vault with the networks it may be used from, then choose it when you enroll a server. On the website you can also pick it when you queue an enrollment or a refresh.

bash
$ servonaut vault import ssh --vault <team-vault> --path ~/.ssh/breakglass_ed25519 --break-glass --from-cidr 192.0.2.0/24 $ servonaut ca enroll <server> --team <team> --break-glass-item <item>

Enrolling adds the key to root's authorized_keys, limited to those networks. The Host enrolment list shows which servers are covered. servonaut ca break-glass-scan --team <team> reads the servers' SSH logs for logins with the key. Each use it finds is recorded in the team's activity log, and the owner gets an e-mail.

Rotating the CA (rollover)

To replace the team's user CA without locking anyone out:

  1. The owner clicks Start rollover… in the CA rollover card on the SSH access tab. Servonaut creates the next CA and queues a refresh of every enrolled server for the owner's Servonaut.
  2. The owner runs the refreshes: servonaut ca jobs --team <team> lists them, and servonaut ca refresh <server> --team <team> carries each one out. Each server then trusts the current CA and the next one, so certificates from both work.
  3. When every server is refreshed, the owner clicks Complete rollover…. New certificates come from the new CA, and certificates from the old one keep working until they expire.

When Servonaut says the team CA changed

Servonaut remembers the team's CA fingerprints and follows a rollover by itself. If a CA changes in a way it can't confirm, it stops and asks you to check. Compare the fingerprints it shows with the ones on the SSH access tab, then accept them with servonaut ca trust --team <team>. A changed host CA asks you to type part of the new fingerprint. Only accept it if the team owner confirms the change outside Servonaut.

Issuance log and audit

Every certificate the CA issues, for people and for servers, is recorded in an append-only log. Each entry is chained to the one before it with a hash, so a removed or altered entry breaks the chain. Owners and admins see the log on the SSH access tab (serial, type, logins, validity, revoked or not), with a chip showing whether the chain checks out. servonaut ca audit --team <team> downloads the log and checks the whole chain on your own computer.

Who can do what

ActionOwnerAdminMember
Switch on, disable, change policy, roll overYes——
Enroll, refresh and unenroll serversYesYes—
Revoke a certificate, deliver the revocation list, scan for break-glass useYesYes—
See the issuance log and run an auditYesYes—
Connect with a certificateAnyone whose role has a login on the server

Commands

Every ca command takes --team <team>, and --json prints machine-readable output.

CommandWhat it does
servonaut ca statusWhether the CA is on, its fingerprints, the policy and your logins per server
servonaut ca enableSwitch the CA on (owner)
servonaut ca policy [--set JSON]Show or change the policy (owner)
servonaut ca enroll <server>Enroll a server, optionally with --break-glass-item
servonaut ca refresh <server>Update an enrolled server's CA keys, logins, revocation list and host certificate
servonaut ca unenroll <server>Remove the certificate configuration from a server
servonaut ca jobsList the server jobs waiting for you
servonaut ca revoke <serial>Revoke one certificate
servonaut ca krl [--server S]Deliver the current revocation list now; repeat --server to limit it
servonaut ca break-glass-scan [--hours N]Look for break-glass key logins in the servers' SSH logs
servonaut ca auditVerify the issuance log's hash chain
servonaut ca trustAccept a changed team CA after comparing fingerprints

enable and revoke ask first; add --yes in scripts. enroll, refresh, unenroll and trust always need a person at the keyboard. Exit codes: 0 success, 1 failed, 2 invalid arguments, 5 declined or refused outside a terminal.

Troubleshooting

You seeWhat to do
needs a recent MFA sign-inSign in to Servonaut again with MFA (Account / Login in the app, or servonaut login), then retry.
your plan does not include SSH certificatesThe team owner needs an active Teams subscription. See Billing.
SSH certificates are temporarily paused or coming soonCertificates are switched off for the whole service. Team members keep connecting with vault keys, and nothing is wrong with your setup.
cannot issue SSH certificates right nowA temporary problem on our side. Try again later.
The team SSH CA changedSee When Servonaut says the team CA changed.
foreign_ca_config during enrollmentThe server already has another SSH CA configured. Remove that configuration first.
rolled_backThe server kept its previous setup. Check that it meets the requirements and try again.
not supported on Windows yetConnect from Linux or macOS.
Documentation