← Rules Catalog
mediumauditverified rollback-safe

Audit uses of the ssh-agent command

audit-cmd-ssh-agent · RHEL ≥ 8 · 1 impl

Description

All uses of the ssh-agent command must be audited. The ssh-agent holds private keys used for public key authentication.

Rationale

Auditing ssh-agent usage allows detection of SSH key management activities that could indicate credential theft attempts.

Check → Remediate

Checkaudit_rule_exists
rule:
-a always,exit -F path=/usr/bin/ssh-agent -F perm=x -F auid>=1000 -F auid!=unset
Remediateaudit_rule_set
rule:
-a always,exit -F path=/usr/bin/ssh-agent -F perm=x -F auid>=1000 -F auid!=unset -k privileged-ssh-agent
persist_file:
/etc/audit/rules.d/50-privileged.rules

Framework references

STIG

V-281138 / RHEL-10-500520V-258201 / RHEL-09-654135V-230421

NIST 800-53

AU-2AU-12

Live verification

rhel8:checkrhel9:check
#audit#auditd#privileged#ssh