Hunting for Rogue SSH Key Injections with journalctl
SSH key injection is a silent threat that can slip past static hardening. Attackers often add a malicious public key to a user’s authorized_keys file or to the system‑wide /etc/ssh/ssh_config.d/ directory, gaining persistence without leaving obvious footprints. The Linux journal, managed by systemd, records every authentication attempt, including the key fingerprint that was used. By querying journalctl for anomalous key fingerprints, you can spot unauthorized additions before they become a foothold.