Short-Lived SSH Access with User Certificates
Replace authorized_keys with SSH certificates signed by your
organization's SSH CA. People and automation get certificates that last hours, and the
Unix accounts they may log in as are managed centrally in Prism.
Overview
Every Prism organization has an SSH certificate authority. Servers trust that CA once
(TrustedUserCAKeys), and from then on any key certified by Prism is accepted
for the Unix accounts listed in the certificate's principals. Prism takes those principals
from the Unix usernames an admin has assigned to the user or service account; callers
cannot ask for others.
- Onboarding is assigning a Unix username in Prism; offboarding is removing it, and existing certificates expire within hours.
- No per-server key distribution, and no stale keys left in
authorized_keys. - Every certificate issued is audit logged with its key ID, serial, principals and validity.
For EC2 instances that should also present Prism host certificates, see EC2 Host Identity and SSH Certificates.
-
Define the Unix accounts
Unix usernames are an organization-wide catalog:
prism unix-usernames create --username deploy prism unix-usernames create --username ec2-user prism unix-usernames list -
Assign Unix usernames to people and service accounts
setreplaces the whole list:prism users unix-usernames set alice deploy ec2-user prism users unix-usernames set bob deploy # Automation, e.g. a backup job prism unix-usernames create --username backup prism service-accounts unix-usernames set build-runner backup -p payments # Offboarding: remove the assignments prism users unix-usernames set bob -
Trust the Prism SSH CA on servers
Fetch the CA public key once and point sshd at it:
prism org ssh-ca > prism_user_ca.pub sudo install -m 644 prism_user_ca.pub /etc/ssh/prism_user_ca.pub echo 'TrustedUserCAKeys /etc/ssh/prism_user_ca.pub' | sudo tee /etc/ssh/sshd_config.d/40-prism.conf sudo sshd -t && sudo systemctl reload sshdConfiguration management can fetch it over HTTP with any organization member's token:
GET /api/v1/organizations/ssh-ca.pub. -
Get a certificate and log in
Any logged-in member of the organization can certify their own key. The default lifetime is one hour and the maximum is 24 hours:
prism auth login --org acme --username alice --password '…' prism --output json org ssh-cert --public-key ~/.ssh/id_ed25519.pub --validity-seconds 28800 \ | jq -r .certificate_openssh > ~/.ssh/id_ed25519-cert.pub ssh-keygen -L -f ~/.ssh/id_ed25519-cert.pub # Key ID: "alice" # Valid: from 2026-11-11T22:17:52 to 2026-11-12T06:17:52 # Principals: # deploy # ec2-user ssh deploy@build01.example.comOpenSSH picks up
id_ed25519-cert.pubnext to the private key automatically. Renew it at the start of each working day, e.g. from a shell alias. -
Certificates for automation
A service account gets certificates the same way, with its own Unix usernames as principals. The key ID is its canonical name:
# Logged in as the service account (API key, key pair, GitHub Actions, AWS, …) prism --profile runner org ssh-cert --public-key ./id_ed25519.pub --validity-seconds 600A user who holds
service_accounts.act_ason a service account can get a certificate on its behalf, which is useful for shared break-glass accounts:prism org ssh-cert --public-key ~/.ssh/id_ed25519.pub \ --as-service-account build-runner@service-accounts.payments.id.prism.local
Auditing
prism org audit --org acme
# … OrganizationsIssueSshCertificate allowed
# {"key_id":"alice","serial":1794431872028431,"valid_principals":["deploy","ec2-user"],…}
sshd logs the key ID and serial of the certificate used for each login, so a login on a server can be traced back to the Prism principal and issuance.
Security considerations
- sshd does not ask Prism at login time. Removing someone's Unix usernames stops new certificates, but already issued ones remain valid until they expire, so keep lifetimes short.
- A principal without any assigned Unix username cannot get a certificate at all.
- Members may certify their own keys by default (
organizations.issue_ssh_certificateis granted to all organization members). Restrict who can log in where through the Unix usernames you assign, or with adenygrant.