Interview Prep/Linux/SSH, sudo and authentication

SSH certificate login fails with `Certificate invalid: expired`, even though it was issued an hour ago with 8h validity.

AdvancedTroubleshootingSSH, sudo and authentication
Answer

Likely causes → Clock skew on the server (or CA) makes the cert look expired or not yet valid.

Diagnose →

ssh-keygen -L -f ~/.ssh/id_ed25519-cert.pub | grep Valid
ssh server date -u 2>/dev/null; date -u
chronyc tracking

Fix → Fix time sync on the server/CA. Issue certs with a small backdated start (-V -5m:+8h) to tolerate minor skew.

Prevent → Monitor NTP offset on every host.

All Linux questions Roadmap: Linux

More on SSH, sudo and authentication