Managing SSH access at scale is one of the most common infrastructure challenges. Traditional SSH key management relies on distributing public keys via authorized_keys files, which becomes unwieldy as teams grow: keys are rarely rotated, departed employees retain access, and auditing who accessed what server is nearly impossible.
SSH certificates solve these problems by using a certificate authority (CA) to sign short-lived SSH credentials. Instead of managing individual keys, you trust the CA and let it issue time-limited certificates for users and hosts.
This guide compares three open-source tools for self-hosted SSH certificate management: smallstep step-ca, HashiCorp Vault, and Teleport.
Comparison Table
| Feature | step-ca | HashiCorp Vault | Teleport |
|---|---|---|---|
| Stars | 8,400+ | 35,500+ | 20,200+ |
| Primary Focus | Private CA (X.509 + SSH) | Secrets management platform | Zero-trust access platform |
| SSH CA | Yes (built-in) | Yes (SSH secrets engine) | Yes (built-in) |
| TLS/PKI | Yes (full ACME server) | Yes (PKI secrets engine) | Yes (application access) |
| Certificate Lifetime | Configurable (minutes to years) | Configurable (minutes to years) | Short-lived (minutes to hours) |
| Authentication | JWT, OAuth, SSO, API key | Multiple auth methods (LDAP, OIDC, etc.) | GitHub, SAML, OIDC, SSO |
| Audit Logging | Basic (certificate issuance log) | Comprehensive (audit device) | Comprehensive (session recording) |
| Session Recording | No | No | Yes (SSH session playback) |
| Docker Image | smallstep/step-ca | hashicorp/vault | gravitational/teleport |
| Last Active | 2026 | 2026 | 2026 |
| Language | Go | Go | Go |
smallstep step-ca: The Lightweight Private CA
step-ca is a private certificate authority that issues both X.509 TLS certificates and SSH certificates. It is designed to be simple, secure, and ACME-compatible — making it the easiest option to deploy for teams that need SSH certificates without a complex secrets management platform.
Docker Compose Deployment
| |
Generating SSH Certificates
| |
SSH Client Configuration
| |
SSH Server Configuration
| |
HashiCorp Vault: The Enterprise Secrets Platform
Vault is a comprehensive secrets management platform that includes an SSH secrets engine. If you are already using Vault for secrets, encryption, or PKI, adding SSH certificate management is a natural extension.
Docker Compose with Dev Mode (Testing)
| |
Production Configuration
| |
Vault Config for SSH CA
| |
Configuring the SSH Secrets Engine
| |
SSH Server Configuration with Vault
| |
Teleport: Zero-Trust Access with Session Recording
Teleport is a zero-trust access platform that provides SSH access with built-in certificate management, role-based access control, and session recording. Unlike step-ca and Vault, Teleport is purpose-built for infrastructure access rather than general-purpose secrets management.
Docker Compose Deployment
| |
Teleport Configuration
| |
Creating a User and Role
| |
Connecting via Teleport
| |
When to Use Each Tool
Use step-ca when:
- You need a simple, dedicated SSH + TLS certificate authority
- Your primary requirement is certificate issuance without session recording
- You want ACME compatibility for automatic TLS certificate renewal
- You prefer a lightweight, single-purpose tool over a platform
- You are a small-to-medium team that needs SSH certificates without complex RBAC
Use HashiCorp Vault when:
- You are already using Vault for secrets management or PKI
- You need SSH certificates as part of a broader secrets management strategy
- You require dynamic SSH credentials (Vault generates key pairs on demand)
- Your organization needs comprehensive audit logging across all secrets
- You have an existing Vault infrastructure and want to consolidate tooling
Use Teleport when:
- You need SSH session recording and playback for compliance
- You want a web-based SSH client with role-based access control
- You need unified access for SSH, Kubernetes, databases, and web applications
- You require just-in-time access with time-limited certificates
- You need to comply with SOC 2, HIPAA, or PCI-DSS audit requirements
Why Self-Host SSH Certificate Management?
Self-hosting SSH certificate infrastructure provides critical security and compliance benefits:
- Eliminate SSH key sprawl: Instead of managing hundreds of
authorized_keysfiles across servers, you manage a single CA. User access is granted through certificate issuance, not key distribution - Short-lived credentials: Certificates expire automatically. A 24-hour certificate means a compromised key is useless after a day. Contrast this with traditional SSH keys that never expire until manually revoked
- Automatic revocation: When an employee leaves, you do not need to update
authorized_keyson every server. The CA simply stops issuing certificates for that user - Compliance and auditing: Certificate issuance logs provide a clear record of who received access and when. Teleport goes further with full session recording, showing exactly what commands were executed
- Zero vendor dependency: Cloud SSH solutions (AWS Systems Manager, Azure Arc) tie your access management to a specific cloud provider. Self-hosted solutions work identically across AWS, GCP, Azure, and bare metal
For SSH security hardening, see our Fail2ban vs SSHGuard vs CrowdSec guide. If you need TLS certificate automation alongside SSH certificates, check our cert-manager vs Lego vs ACME.SH comparison. For Kubernetes access management, our Teleport guide covers container security hardening.
FAQ
What is the difference between SSH keys and SSH certificates?
SSH keys are a public/private key pair where the public key is placed in authorized_keys on each server. SSH certificates are public keys signed by a Certificate Authority (CA). Instead of trusting individual keys, servers trust the CA’s public key. The CA can issue time-limited certificates with embedded principals (allowed usernames), extensions (capabilities), and critical options (source IP restrictions).
How long should SSH certificates be valid?
For user certificates, 8-24 hours is typical. The certificate should be valid long enough for a work session but short enough that compromise has limited impact. For host certificates, longer lifetimes (1 year) are acceptable since host keys change less frequently. Teleport defaults to very short lifetimes (minutes), while step-ca and Vault allow you to configure any duration.
Can I use SSH certificates with existing SSH keys?
Yes. SSH certificates work on top of existing SSH key pairs. You generate a key pair as normal, then submit the public key to your CA (step-ca, Vault, or Teleport) for signing. The CA returns a certificate file that you use alongside your private key. Your private key never leaves your machine.
What happens when an SSH certificate expires?
When a certificate expires, the SSH server rejects the connection because the certificate is no longer valid. The user must request a new certificate from the CA. This is typically automated: step ssh login, vault ssh, or tsh login will issue a fresh certificate. The old private key remains valid but needs a new signature.
Do I need to restart sshd after configuring SSH certificates?
Yes, after adding TrustedUserCAKeys to /etc/ssh/sshd_config, you must restart the SSH daemon: systemctl restart sshd. However, this does not disconnect existing sessions. Only new connections will use certificate authentication.
Can SSH certificates replace passwords entirely?
Yes. With SSH certificates, users authenticate by presenting a valid certificate signed by the trusted CA. No password is needed on the SSH server side. The user’s identity is established during certificate issuance (via OAuth, SSO, or other authentication at the CA level), not during the SSH connection itself.