SSH authorized_keys

Each account's ~/.ssh/authorized_keys lists public keys allowed to log in without a password. Adding a key is a simple, durable backdoor (ATT&CK T1098.004).

LinuxNetwork and remote accessParser: ssh_authorized_keys4 fieldsCollected by priority triage

What SSH Authorized Keys is

Network and remote-access artifacts record connections, remote sessions and remote-access tools: RDP, SSH, VPN clients and remote-administration software.

Forensic value

What SSH Authorized Keys can tell an investigator:

  • Keys that do not belong to the organisation, including their comments (such as attacker@kali).
  • Options such as command= or from= that restrict or abuse the key.
  • File times that date when a key was added.

What it does not prove

  • Root and service accounts have their own files; check every home directory.

Where it is stored

Arcsentry looks for SSH Authorized Keys at this location inside a collection, disk image or mounted volume:

%user_home%/.ssh/authorized_keys*

What Arcsentry records

Each SSH Authorized Keys record is written to Arcsentry's common schema with these fields, alongside the host, timestamp and provenance every record carries:

FieldTypeMeaning
optionsKey options as written, including command= forced commands, which attackers use to keep access
key_typeSSH key type (e.g. ssh-ed25519, ssh-rsa, ecdsa-sha2-nistp256)
public_keyBase64-encoded public key authorized for login
commentTrailing comment (commonly user@host provenance)

Time

Collection time only; file mtime indicates when access was last granted. Arcsentry keeps each record's own time and labels its time zone when the source does not state one. A record with no time of its own stays untimed; Arcsentry never substitutes the collection time.

Collecting SSH Authorized Keys with Arcsentry Collector

Arcsentry Collector gathers SSH Authorized Keys in these triage profiles: linux::profile::triage::priority, linux::profile::triage::offline, linux::profile::triage::full. It is read straight from the file system, on a live host or inside a disk image, without mounting.

The collection targets that pick it up: linux::execution::docker_ondisk, linux::filesystem::bodyfile, linux::remote_access::authorized_keys, linux::security::hidden_directories, linux::security::hidden_files.

sudo ./arcsentry-collect collect --local -t linux::profile::triage::priority \
  -o /mnt/ir -f host.arcx --password-file /mnt/ir/pw.txt

Every file lands in one AES-256 archive with a SHA-256 recorded for it, and the collection log notes which target collected it. See everything each profile collects.

Already collected with something else? Arcsentry also reads KAPE, Velociraptor and UAC collections, so SSH Authorized Keys can come from the tools you already use.

Analysing SSH Authorized Keys in Arcsentry

Ask in plain English, for example "show SSH Authorized Keys records from the incident window, newest first", and Arcsentry shows the query before it runs. Or write it in AQL:

filter event_type == "ssh_authorized_keys"
sort {-timestamp}
take 100

Mark a record malicious or suspicious and it joins the timeline in its kill-chain lane. Add its values as indicators and Arcsentry matches them across every host. When the AI investigator works the case, it reads SSH Authorized Keys records with the same tools and cites them by event ID.

Corroborate with

No single artifact settles a question on its own. Check SSH Authorized Keys against:

  • Syslog: Parses Linux syslog and auth.log files.
  • auditd: Parses /var/log/audit/audit.log* and correlates the SYSCALL, EXECVE, CWD, PATH and USER_* records of one audit event by its stamp (time and serial).
  • Bash history: Parses shell and interactive interpreter command history files (bash, zsh, fish, ash and other shells, Python, Node.js, irb and database shell clients such as psql, MySQL and Redis).

Frequently asked

How do you find a backdoor SSH key?

Compare every authorized_keys file against your key inventory, and check syslog for "Accepted publickey" logons with that key's fingerprint.

Does Arcsentry parse SSH Authorized Keys?

Yes. Arcsentry's SSH Authorized Keys parser (ssh_authorized_keys) reads it from Linux evidence and records 4 fields per record, with provenance back to the source file.

How do I collect SSH Authorized Keys?

Arcsentry Collector gathers it with the priority triage profile (linux::profile::triage::priority), live or from a disk image, sealed in an AES-256 archive with a SHA-256 for every file.

Parse SSH Authorized Keys on your own evidence.

Tell us what you want to investigate. A person replies within one business day with the download and a trial licence.

Request a trial