← Back to Articles
Cyber Security • Zero Trust SSH

Zero-Trust SSH Access Blueprint: FIDO2 Hardware Keys & SSH Certificate Authority

Zero-Trust SSH Access Blueprint: FIDO2 Hardware Keys & SSH Certificate Authority
Zero-Trust Infrastructure Blueprint for FIDO2 Hardware Tokens & SSH Certificate Authority
Executive Summary & Key Security Takeaways
  • Eliminate Static Keys:Migrate from staticauthorized_keysdeployment to short-lived SSH Certificates.
  • FIDO2 Hardware Bound:Enforceed25519-skkey pairs tied to physical security tokens (YubiKey/FIDO2).
  • Centralized Authority:Use an offline SSH Certificate Authority (CA) to sign user access requests with automatic 8-hour expiration.
  • Zero Administrative Sprawl:Adding or revoking user permissions requires zero modifications on target servers.

1. The Death of Static SSH Keys: The Zero-Trust Paradigm

Traditional SSH infrastructure management relies on static public keys manually distributed into ~/.ssh/authorized_keys files across dozens or hundreds of servers. Over time, authorized_keys files become unmaintainable repositories of forgotten, unrotated, and orphaned access keys. When an engineer leaves an organization, revoked access requires touching every single server individually.

Zero-Trust Architecture eliminates static credentials entirely. Under the Zero-Trust model, trust is never implicit based on network perimeter location; instead, every access request must be authenticated, authorized, and cryptographically verified using short-lived credentials.

By replacing static public keys with an ephemeral SSH Certificate Authority (SSH CA), organizations eliminate key sprawl and establish centralized access control policies.

Short-lived authentication claims and cryptographic identity assertions can be decoded with our JWT Token Inspector.

# Generate an ed25519 SSH Certificate Authority key
ssh-keygen -t ed25519 -f /etc/ssh/ssh_user_ca -C "Production SSH User CA"

2. Hardware-Backed Authentication with FIDO2 / WebAuthn Keys

Software-based SSH private keys stored in plaintext on developer laptops are vulnerable to malware exfiltration, memory scraping, and inadvertent exposure. Modern SSH implementations solve this by binding private keys to physical hardware security keys using FIDO2 / WebAuthn and the ed25519-sk algorithm.

With FIDO2 keys (such as YubiKey or SoloKey), the private cryptographic material never leaves the secure hardware element. Signing an SSH session requires physical user presence (a touch or tap) and biometric or PIN verification, completely neutralizing remote malware and phishing attacks.

Even if an attacker gains root access to a developer workstation, they cannot forge SSH signatures without physical possession of the hardware token.

Verify cryptographic nonces and compute checksums with our Cryptographic Hash Generator.

# Generate a resident FIDO2 hardware SSH key
ssh-keygen -t ed25519-sk -O resident -O verify-required -f ~/.ssh/id_ed25519_sk

3. Automated Issuance of Short-Lived Ephemeral Certificates

Rather than granting indefinite SSH access, modern infrastructure utilizes automated certificate issuance pipelines. Developers authenticate against an enterprise Identity Provider (IdP) with Multi-Factor Authentication (MFA) via Single Sign-On (SSO).

Upon successful SSO verification, the automated CA issues a short-lived OpenSSH certificate valid for only 8 to 12 hours. The certificate embeds the user identity, authorized principals (e.g. ubuntu, admin, deploy), source IP restrictions, and strict expiration timestamps.

When the certificate expires, access terminates automatically without requiring manual key deletion across server fleets.

Generate hardened server configs with our Linux Hardening Config Builder.

# Sign an engineer key for 8 hours of access
ssh-keygen -s /etc/ssh/ssh_user_ca \
  -I engineer_john \
  -n "ubuntu,admin" \
  -V +8h \
  ~/.ssh/id_ed25519_sk.pub

4. Configuring Host Servers to Trust the SSH CA

Configuring infrastructure servers to trust SSH certificates requires zero user-specific authorized_keys management. Target servers simply configure a single TrustedUserCAKeys directive pointing to the public key of the SSH CA.

When an incoming SSH connection arrives, the host sshd daemon validates the cryptographic signature on the user certificate against the CA public key, verifies that the requested username matches the permitted principals, and checks that current time falls within the certificate validity window.

This decoupled cryptographic architecture enables frictionless horizontal scaling without synchronization delays.

Configure account lockout thresholds via our PAM Faillock Config Generator.

# /etc/ssh/sshd_config
TrustedUserCAKeys /etc/ssh/ssh_user_ca.pub
AuthorizedPrincipalsFile /etc/ssh/auth_principals/%u
PasswordAuthentication no
PubkeyAuthentication yes

5. Centralized Telemetry & Bastion ProxyJump Hardening

In enterprise environments, direct internet ingress to production servers is strictly prohibited. Traffic is routed through hardened Bastion jump hosts using SSH ProxyJump directives.

Because certificates embed immutable key IDs and usernames, bastion jump hosts and destination nodes log every single session initiation with rich forensic context to central syslog and auditd daemons.

This provides continuous compliance records, auditability, and immediate anomaly detection across the entire cloud fleet.

Audit system calls and generate monitoring rules with the Auditd Rule Generator.

# ~/.ssh/config for ProxyJump Bastion
Host production-*
    ProxyJump bastion.infra.zyekh.com:2222
    User admin
    IdentityFile ~/.ssh/id_ed25519_sk
    CertificateFile ~/.ssh/id_ed25519_sk-cert.pub

Frequently Asked Questions (FAQ)

What happens when an SSH certificate expires?

Once the certificate validity period expires (e.g., +8h), OpenSSH automatically rejects all authentication attempts using that certificate. No server-side cleanup or manual key removal is required.

Can FIDO2 SSH keys be used without internet connectivity?

Yes. OpenSSH communicates directly with the FIDO2 hardware token over USB/NFC via standard libfido2 drivers, requiring zero external internet connection.

Zyekh Abdul Qadir Jailani

Written by Zyekh Abdul Qadir Jailani

Digital Forensics & Incident Response (DFIR) Specialist & Security Researcher specializing in Linux kernel hardening, threat hunting, and system security research.

Utility Security Tools Related to this Article:

Gunakan Generate Key Fingerprints -> untuk membantu alur kerja konfigurasi keamanan Anda secara privasi di browser.