Interview Prep/Linux/SSH & Access Hardening

What is `AuthorizedKeysCommand` used for?

IntermediateProductionSSH & Access Hardening
Answer

sshd runs a program to fetch a user's public keys at login instead of (or in addition to) reading files.

AuthorizedKeysCommand /usr/local/bin/fetch-keys %u
AuthorizedKeysCommandUser nobody

The program prints keys to stdout, e.g. from LDAP/SSSD (sss_ssh_authorizedkeys), IAM, or an internal API. Revoking access centrally takes effect on the next login without touching servers. The command must be root-owned and not writable by others.

All Linux questions Roadmap: Linux

More on SSH & Access Hardening