SSH authorized_keys Audit: find the key that survives your patch
An attacker with code execution on a server adds one line to authorized_keys and keeps SSH access after you patch. Paste the files from your servers and the keys you expect: every key is fingerprinted, and the ones nobody owns, the weak ones and the risky ones are flagged with what to do.
Public keys only. Runs in your browser; nothing is uploaded.
Collect them with tail -n +1 /root/.ssh/authorized_keys /home/*/.ssh/authorized_keys or grep -H . <files>. Add find / -name authorized_keys -printf '%TY-%Tm-%Td %p\n' lines to get change dates.
Loading…
Sample report · illustrative data
Sample result: six keys in two authorized_keys files
root’s and a deploy account’s authorized_keys, with file dates, checked against two expected keys (ops-alice@laptop, ci-deploy).
Summary
- Critical
- 1 (React2Keys attacker key in /root, file changed 27 Nov)
- High
- 2 (unknown DSA key for root, unknown key with environment=)
- Medium
- 2 (one person’s key in both accounts)
- OK
- 1 (ci-deploy: restrict, forced command, from= limit)
Keys, most serious first
| File | Comment | Type | Flag |
|---|---|---|---|
| /root/.ssh/authorized_keys | bluelocale-foothold | ssh-ed25519 | Critical: known attacker key (CloudSEK indicator) |
| /root/.ssh/authorized_keys | old-backup | ssh-dss | High: DSA, not on your list, unrestricted root key |
| /home/deploy/.ssh/authorized_keys | (none) | ssh-ed25519 | High: not on your list, environment="LD_PRELOAD=…" |
| both files | ops-alice@laptop | ssh-ed25519 | Medium: same key in 2 files |
| /home/deploy/.ssh/authorized_keys | ci-deploy | ssh-ed25519 | OK: restricted automation key |
What to do, most needed first
- Treat the root host as compromised: copy the file, rotate every secret it held, review cron jobs and SSH logins, patch React2Shell.
- Find the owner of every unknown key; remove keys nobody owns after saving a copy.
- Replace the DSA key; restrict automation keys with restrict, a forced command and from=.
- Alert on writes to authorized_keys, sudoers and crontab; manage keys centrally or with SSH certificates.
Made-up example data. Your own run uses your inputs. Downloads of the full report need Pro.
TL;DRWhat this audit does
5 points
- Paste the authorized_keys files from your servers (one file, several with headers, or grep -H output) and, if you have it, the list of keys you expect.
- Every key gets its SHA256 fingerprint, exactly as ssh-keygen -lf prints it, so you can match it against SSH login logs.
- Flags keys that are not on your expected list, the React2Keys attacker key CloudSEK published, DSA and short RSA keys, risky options (environment=, port forwarding, forced commands that start a shell), unrestricted root keys, keys shared across accounts and files changed inside your investigation window.
- Ranks what to do: account for every key, alert on changes, manage keys centrally, replace weak ones.
- Runs in your browser. Paste public keys only; never a private key.
What gets flagged
| Check | Flag |
|---|---|
| Not in your expected list | High |
| React2Keys key (CloudSEK indicator) | Critical |
| DSA key, RSA under 2048 bits | High |
| Forced command that starts a shell or downloader | High |
| environment=, permitopen, permitlisten, tunnel | Medium |
| Unrestricted key in root’s file | Medium |
| Same key in several files | Medium |
| File changed inside your window | Medium |
When to use it
After React2Shell. CloudSEK (30 November 2026) says the React2Keys campaign exploited React2Shell (CVE-2025-55182) to steal more than 50,000 credentials from over 19,000 victims, and appended its own SSH key to compromised accounts so that patching does not remove access. It advises reviewing every authorized_keys file for unknown keys, including the published one, then cron jobs and SSH logins, and rotating all secrets on affected hosts.
After any web-server compromise. Microsoft (1 December 2026) lists authorized_keys changes on integration and application servers among the persistence in AI-assisted Linux intrusions, and recommends monitoring authorized_keys, sudoers and crontab. Pair this audit with the Web Shell File Finder for planted PHP files and cron droppers.
Frequently asked questions
Why check authorized_keys after patching React2Shell?
CloudSEK reports that the React2Keys actor, after exploiting React2Shell (CVE-2025-55182), appended its own SSH public key to compromised accounts’ authorized_keys "so patching does not remove access". A patched server with that key still lets the attacker in over SSH. CloudSEK published the key (comment label "bluelocale-foothold") as a confirmed indicator; this audit matches it.
How do I collect the files?
On each server, run tail -n +1 /root/.ssh/authorized_keys /home/*/.ssh/authorized_keys (the ==> file <== headers tell the audit which account each key belongs to). Also run sshd -T | grep -i authorizedkeys to see whether sshd reads keys from somewhere else.
What counts as an expected key?
Paste the keys you know about in the second box: full key lines, SHA256 fingerprints (from ssh-keygen -lf or your key inventory) or comments such as alice@laptop. Any key that matches none of them is flagged as unknown. Comments are easy to fake, so prefer fingerprints for important servers.
Is it safe to paste authorized_keys?
authorized_keys holds public keys, which grant nothing on their own. The audit runs in your browser and uploads nothing. Never paste a private key (a file that begins with -----BEGIN OPENSSH PRIVATE KEY-----).
Why is DSA flagged?
OpenSSH disabled DSA by default in 2015 and removed it entirely in OpenSSH 10.0 (April 2025). A DSA key on a server is either dead weight or a sign the server runs very old software.
I found an unknown key. What now?
Copy the file and its timestamps before changing anything. Search your SSH logs for logins with the key’s fingerprint, find out who added it, and if nobody did, treat the host as compromised: remove the key, review cron jobs and accounts, and rotate every secret the host held.
More tools like this
Related tools and labs, with new picks every day.