pam_tty_audit and auditd vs session recording

auditd is the Linux kernel's audit log: it records which programs ran and which files were touched. Its add-on, pam_tty_audit, records the keys a user typed, but never what appeared on screen, so you can't replay a session. Keep auditd for system-level evidence, and add session recording if an investigation needs to see what the person saw.

Get started freeHow shellz workslast verified

Choose shellz if

  • You need command output: what a file contained when someone printed it, or what an editor showed before a save.
  • Responders need to watch a session while it's still open.
  • Recordings should be encrypted on the server and signed, so gaps or edits show.
  • Auditors or clients need to watch sessions in a browser instead of reading raw logs.

Stick with auditd alone if

  • You need a record of system calls and file access, for example for DISA STIG rules.
  • You must cover cron jobs, background services and every other process, not just logins.
  • Evidence must stay on the server or in your SIEM.
  • You already alert on audit events and nobody has asked for replay.

At a glance

shellz vs auditd + pam_tty_audit, checked against man pages and Red Hat docs on 2026-11-03
Capabilityshellzauditd + pam_tty_audit
What appeared on screenYes, full terminal outputNo, keystrokes only
ReplayYes, at any speed, plus a transcriptNo
Console logins and `su -`Yes, with screen outputPartial: keystrokes, if configured for that login type
System call and file auditingNoYes
Processes without a terminalNo: logins, remote commands and SFTP onlyYes, any process matching a rule, such as cron jobs
When data arrivesLive, about one second behindKeystrokes are buffered; on RHEL 8, written at logout
Typed passwordsNever recordedNot at normal password prompts; passwords typed into an onward SSH session are logged
EncryptionYes, encrypted on the server before uploadPartial: can encrypt in transit; stored as plain text
Tamper evidenceYes, every segment is signed and chainedNo signing; rules can be locked until reboot
SearchIn the browser, by user, source IP, command, server or containerCommand-line tools, or your SIEM
SIEM feedNo, and no public APIYes
AlertsEmail, Slack, webhookThrough your SIEM
CostFree for 10 active devices; paid plans $10 per member a month + $1/GBFree, included in RHEL and Ubuntu

In an incident, keystrokes don't tell you what happened

Say an alert fires because a database server is talking to an unknown address. auditd shows you that curl and tar ran, and which account started them, even if the user switched to root with su.

Then you check the keystroke log. It shows cat /etc/my, a tab, vi, the up arrow. You know which keys were pressed. You don't know what tab completion filled in, what cat printed, or what was saved in vi. On RHEL 8, a session that's still open may show nothing yet, because keystrokes are written at logout.

auditd told you the process, the account and the file. What was on the screen has to come from a session recording.

auditd sees every process, with or without a terminal

auditd collects security events from the kernel, whatever caused them: a cron job, a background service, or a script started by a compromised web server. It detects; it doesn't block anything. Red Hat ships a sample rule set for DISA STIG compliance, and you can lock the rules so they can't change until the next reboot.

pam_tty_audit has gaps, including a password leak

Keystroke logging is off by default. You turn it on per user by adding pam_tty_audit to the login configuration (for SSH, /etc/pam.d/sshd), and read the results with aureport --tty. Know these limits before you rely on it:

  • It records input only. Special keys show up as labels like <tab> and <up>, and nothing on screen is captured.
  • It skips normal password prompts by default.
  • It does log passwords typed into an onward SSH connection. If a user hops from this server to another, the second server's password lands in the log.
  • Programs started from the session inherit keystroke logging, including services the user restarts. The man page recommends turning it off for most services first.

Keep auditd and add a recorder for the screen

Keep forwarding audit events to your SIEM. shellz doesn't audit system calls or export to a SIEM, so it can't replace that trail.

shellz records SSH logins, one-off remote commands, SFTP, local and serial consoles, su -, desktop terminals, tmux and screen, and docker exec. Each session is encrypted before upload. If a login gets around the recorder, shellz ends it and alerts you. AI agents that log in are recorded like people. An agent running as a background service never logs in, so only auditd sees it.

In an incident, the audit event gives you the time, process and account. The recording shows the output and what was in the editor. If all your servers run RHEL, see the tlog comparison. If you're on Ubuntu and lost sudo session logs, see the sudo I/O logging options.

If your control only asks for system and file auditing, auditd is enough

auditd and pam_tty_audit are free, ship with every major distribution, and feed your existing SIEM. Add replay only if someone will use it. The free shellz plan covers 10 active devices, enough for a production trial next to auditd (pricing).

Questions

Does pam_tty_audit record command output?

No. It records keystrokes only, so there's nothing to replay.

Does pam_tty_audit log passwords?

Not at normal password prompts. It does log what's typed into an onward SSH session, including the other server's password.

How do I read pam_tty_audit logs?

Run aureport --tty. For the raw events, run ausearch --start today -m TTY -i.

Why does aureport --tty show nothing?

Either the module isn't in the login configuration users come in through (for SSH, /etc/pam.d/sshd), or the records haven't been written yet. Keystrokes are buffered, and on RHEL 8 they arrive at logout.

Can shellz replace auditd?

No. shellz records terminal sessions. It doesn't audit system calls or file access and has no SIEM export, so keep auditd.

Related comparisons

Sources

Competitor details come from public documentation and pricing pages, last checked on November 3, 2026. Products change; if something here is out of date, tell us at hello@shellz.dev and we will correct it.

  1. pam_tty_audit(8) manual
  2. Red Hat: Auditing the system (RHEL 10)
  3. aureport(8) manual
  4. ausearch(8) manual
  5. auditctl(8) manual
  6. audisp-remote.conf(5) manual
  7. Red Hat solution 7037424: pam_tty_audit.so does not create USER_TTY events
  8. Red Hat solution 5585231: TTY auditing different in RHEL 8
  9. Red Hat: Configuring PAM for auditing (RHEL 6 Security Guide)
  10. Ubuntu packages: auditd (26.04)
~ $ shellz --helpOne command. Two minutes. Every session recorded.