Subscribe to the Non-Human & AI Identity Journal

SSH tunneling

SSH tunneling is a method of carrying application traffic inside an encrypted SSH session between a client and a remote service. It protects data in transit, but it does not automatically govern who may open the tunnel, what the tunnel can reach, or how the session is audited.

Expanded Definition

SSH tunneling, sometimes called SSH port forwarding, is a transport technique that encapsulates one network connection inside an authenticated SSH session. In NHI environments, it is commonly used to reach internal services, jump through restricted networks, or protect legacy protocols that were never designed with native encryption. The key distinction is that SSH tunneling secures the path, but it does not by itself define identity assurance, session approval, destination restrictions, or privileged activity monitoring. Those governance layers still need to be enforced separately through NHI controls, access policy, and audit logging.

Definitions vary across vendors on how broadly “tunneling” should be applied, but the operational meaning is consistent with RFC 4254 SSH connection forwarding mechanisms. In practice, security teams should treat tunnel creation as a privileged action that can expand reachability in ways that bypass normal application controls. NHI Management Group guidance on the Ultimate Guide to NHIs shows why this matters: tunnel use often becomes a hidden path for service accounts, automation, and emergency access. The most common misapplication is treating an encrypted SSH session as sufficient authorization, which occurs when teams assume confidentiality also implies approved destination access.

Examples and Use Cases

Implementing SSH tunneling rigorously often introduces administrative friction, because every tunnel can create a temporary exception to normal network paths and therefore requires tighter approval, logging, and review.

  • A deployment pipeline opens a local tunnel to a database that is only reachable from a private subnet, allowing an automation job to run without exposing the database publicly.
  • An engineer uses remote port forwarding to expose an internal service to a controlled bastion host during incident response, then closes the tunnel after the investigation.
  • A legacy admin console that cannot speak modern TLS is accessed through an SSH tunnel while the underlying service remains isolated from the internet.
  • A platform team combines tunnel use with policy controls described in Ultimate Guide to NHIs so service accounts are rotated and session access is attributed to a specific workload.
  • Security teams compare tunnel behavior against baseline guidance in the NIST Cybersecurity Framework 2.0 to ensure access paths are governed, not just encrypted.

Why It Matters in NHI Security

SSH tunneling becomes risky when it is used as an informal bypass for network segmentation, especially by service accounts, scripts, and operators who already possess elevated access. A tunnel can hide lateral movement, obscure the true destination of a connection, and make routine logging incomplete if the organisation only records the SSH session and not the proxied traffic. That is why SSH tunneling must be evaluated alongside NHI credential scope, bastion policies, and session auditing, not as a standalone safeguard.

The governance problem is amplified by NHI sprawl. NHI Management Group reports that NHIs outnumber human identities by 25x to 50x in modern enterprises, and 97% carry excessive privileges, which means a single tunneling-capable identity may have broader reach than intended when its access is not constrained.

For implementation context, teams should align tunnel handling with NIST Cybersecurity Framework 2.0 control expectations for access management and monitoring, while treating SSH sessions as part of the overall identity boundary rather than a separate exception path. Organisations typically encounter the operational impact only after a compromised service account is used to pivot through a tunnel, at which point SSH tunneling becomes operationally unavoidable to investigate and contain.

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 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-02 SSH tunnels often rely on long-lived secrets and service-account credentials.
NIST CSF 2.0 PR.AC-4 SSH tunneling changes how network access is granted and must be governed as an access path.
NIST Zero Trust (SP 800-207) SC-7 SSH tunneling can bypass implicit trust unless network flows are continuously constrained.

Restrict tunnel-capable identities, inventory their secrets, and rotate credentials before reuse becomes invisible.