By NHI Mgmt Group Editorial TeamBased on StrongDM: “How to Configure Bastion Host for SSH Logging | Part 3 - Tutorial” (June 25, 2025)

TL;DR: Self-managed bastion host logging can capture utmp, wtmp, btmp, syslog, and auditd data, but StrongDM’s tutorial also shows how quickly the resulting audit trail becomes complex, noisy, and dependent on brittle local configuration. For IAM and NHI teams, the lesson is that visibility without governance, retention, and integrity controls is not a durable control model.


At a glance

What this is: This is a tutorial on bastion host SSH logging that shows how local audit sources, remote log shipping, and auditd can create visibility, but also how quickly a self-managed trail becomes fragile.

Why it matters: It matters because IAM, PAM, and NHI teams often inherit bastion-style controls as proof of oversight, yet those logs only help if they are complete, tamper-resistant, and operationally sustainable.


Context

Bastion host SSH logging is the practice of capturing login, session, and file-change activity on a jump host so administrators can reconstruct what happened after access is used. In identity governance terms, the control is only useful if the audit trail survives compromise, deletion, and operational drift.

This tutorial walks through native Linux sources such as utmp, wtmp, btmp, rsyslog, and auditd, then ships logs to a secondary destination for longer-term storage. The underlying problem is not logging itself but whether a self-managed bastion can produce evidence that is complete enough, durable enough, and governable enough to satisfy audit and incident response expectations.


Key questions

Q: What breaks when bastion host logging is built from local files and shell scripts?

A: The trail becomes easy to fragment, hard to normalize, and dependent on the bastion staying intact. Native files can show who logged in and what changed, but they do not by themselves guarantee retention, tamper resistance, or consistent review. If the host is compromised, the evidentiary value of the record drops unless the logs already exist somewhere else.

Q: When does SSH logging become an audit problem rather than a monitoring problem?

A: It becomes an audit problem when the organisation needs to prove access history, not just observe it. If logs are difficult to query, easy to delete, or impossible to retain long enough for review and investigation, the control fails as evidence even if it still functions as monitoring. Auditability depends on lifecycle governance for the logs themselves.

Q: What signals show that bastion logging is too noisy to trust?

A: Warning signs include large audit volumes, repeated tuning changes, unclear ownership of log destinations, and reports that are hard to reproduce from the raw data. Those symptoms usually mean the team has built collection first and governance second, which makes the audit trail fragile under operational stress.

Q: Should teams rely on bastion-host logs or move to centralized access control?

A: Centralized access control is usually the better governance model when the goal is defensible evidence. Bastion-host logs can support investigations, but they still depend on local configuration, host health, and storage discipline. A control plane that governs session access and captures evidence centrally reduces the chance that the logging mechanism becomes the weak link.


Technical breakdown

Native Linux audit sources on a bastion host

A bastion host can draw evidence from several built-in Linux sources. utmp records current sessions and logins, wtmp keeps historical login activity, and btmp records failed authentication attempts. These sources are useful because they exist close to the access point, but they are not a governance model by themselves. They fragment the audit picture across files that differ in scope, retention, and reliability. For identity teams, the technical issue is that visibility is assembled from multiple local records rather than enforced by a centralized control plane.

Practical implication: Treat native logs as input to a governed audit architecture, not as the audit architecture itself.

Remote log shipping does not equal audit integrity

Shipping syslog output to a remote service creates a second copy of events, which helps if the bastion is lost or compromised. But duplication alone does not make the trail defensible. If the host configuration is brittle, if the forwarding path is misconfigured, or if retention and access controls are weak at either end, the record can still be incomplete or disputable. The governance challenge is evidentiary quality, not mere storage. In an NHI or PAM context, the question is whether access evidence remains trustworthy after the system that generated it is no longer trustworthy.

Practical implication: Verify forwarding, retention, and access control as a single evidence chain rather than as separate logging tasks.

auditd produces depth, but depth creates operational drag

auditd can capture granular events such as file changes, command execution, and user activity on monitored paths. That depth is valuable, but it also produces volume, tuning overhead, and analysis burden. On a bastion host, a noisy audit stream can overwhelm operators and storage, especially when every change on sensitive files or directories is logged. The result is a classic security trade-off: more detail increases forensic value, but only if the organisation can keep the rules, reports, and review process usable. Otherwise the audit trail becomes harder to interpret than to collect.

Practical implication: Scope audit rules to the few events that materially matter for forensic reconstruction and compliance evidence.


NHI Mgmt Group analysis

Self-managed bastion logging is an evidence problem, not just a visibility problem. The article shows that teams can collect plenty of session data and still fail to produce an audit trail that stands up to scrutiny. Local logs, ad hoc forwarding, and manually tuned audit rules create evidence that is technically rich but operationally fragile. For NHI and PAM programmes, the decisive question is whether the trail remains trustworthy after the host is no longer trustworthy.

Audit depth without governance creates a false sense of control. auditd can record granular file and command activity, but a dense event stream does not automatically improve assurance. If operators cannot tune, retain, and review that data consistently, the organisation accumulates noise instead of evidence. That is the control gap this tutorial exposes: observability can exist without defensible oversight.

Known sources of audit data need a stronger control plane than a bastion script stack. utmp, wtmp, btmp, rsyslog, and auditd are useful primitives, but they are primitives only. A mature access programme needs central governance over evidence capture, retention, and access to the logs themselves. The practitioner lesson is to stop treating bastion-host logging as a standalone answer to privileged access accountability.

Log integrity must be designed as part of the access model. The article’s off-site logging pattern helps, but it still leaves the host, the shipping path, and the storage destination as separate trust zones. That separation is where audit confidence is won or lost. Teams should frame bastion logging as part of identity evidence management, not as a convenience feature bolted onto SSH.

What this signals

Log integrity is the real bastion-host question. The central issue is not whether a host can emit session events, but whether those events survive compromise, deletion, and operational drift. If the evidence chain depends on the same server being investigated, the control model is weaker than it first appears.

When SSH logging is treated as a standalone server task, teams end up managing retention, review, and access to audit data manually. That pattern does not scale cleanly across privileged access programmes, especially where multiple administrators, shared jump hosts, and compliance evidence are all in scope.


For practitioners

  • Define the audit evidence you actually need List the exact login, session, and file-change events that matter for investigations and compliance, then limit logging to those evidence classes instead of collecting everything by default.
  • Separate evidence capture from the bastion host Forward authentication and session logs to a secondary destination so a compromised host cannot erase the only copy of its own access history.
  • Tune auditd rules before enabling broad monitoring Audit only sensitive paths and privileged actions that support forensics, because wide-open audit rules quickly create noise, storage pressure, and review fatigue.
  • Treat log retention as an access control issue Restrict who can read, modify, or delete audit output, and make sure the storage layer itself is governed as part of the privileged access model.
  • Document the bastion logging operating model Write down who owns configuration changes, who reviews alerts, and how evidence is preserved so the trail remains defensible during audits and incident response.

Key takeaways

  • Bastion host logging can capture useful access evidence, but local logs alone do not create a defensible audit trail.
  • The practical weakness is governance: retention, integrity, review, and recovery all matter once the host itself may be compromised.
  • Teams should treat bastion logging as part of privileged access governance, with secondary storage and tight control over the evidence path.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST SP 800-53 Rev 5, NIST CSF 2.0 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-01 — Improper OffboardingSelf-managed bastion logs fail when access evidence cannot be cleanly preserved or retired.
NHI-05 — Overprivileged NHIBastion hosts often accumulate broad access and logging rights beyond the minimum needed.
NHI-07 — Long-Lived SecretsSSH-based bastions depend on credentials that often persist longer than the evidence they protect.
Recommendation — Define offboarding for bastion evidence so access records cannot disappear with the host. Reduce bastion privileges to the minimum set needed to collect and retain audit evidence. Shorten SSH credential lifetime and remove stale access paths tied to the bastion.
NIST SP 800-53 Rev 5AC-6 — Least PrivilegeAudit and access tooling on the bastion should be limited to the minimum required functions.
Recommendation — Apply least privilege to bastion administrators, log readers, and audit configuration access.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsThe article is about governing privileged access and the evidence around it.
Recommendation — Review bastion entitlements and log access as part of the access authorization process.
CIS Controls v8CIS-5 — Account ManagementBastion logging depends on knowing which accounts are active, used, and reviewable.
Recommendation — Reconcile bastion accounts regularly and remove any unused or shared access paths.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementBastions are designed to observe and constrain privileged access paths used in real intrusions.
Recommendation — Map bastion audit evidence to credential access and lateral movement techniques in detection workflows.

Key terms

  • Bastion Host: A bastion host is an intermediary system used to reach protected internal resources. It centralises entry but also concentrates trust and availability risk, which means the design only works well when logging, offboarding, and recovery are tightly controlled.
  • Audit Trail: An audit trail is a record of who accessed a system, what they did, and when they did it. For PHI environments, it provides the evidence needed to investigate incidents, support breach determinations, and demonstrate that access was attributable to a specific identity or workflow.
  • Auditd: Auditd is the Linux audit subsystem used to record system events such as file changes, command execution, and authentication-related activity. In privileged access environments, it provides detailed evidence, but the rules must be scoped carefully so the resulting logs remain reviewable and operationally useful.
  • Session logging: Session logging captures activity performed during an access session, such as commands, queries, or remote actions. It supports investigation and accountability, but it only works as a control when the logs are complete, contextual, and connected to the approval and revocation workflow.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are responsible for identity security strategy or NHI governance in your organisation, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on June 8, 2026.
Updated on October 8, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org