Join our Newsletter — 33% off our NHI Course

How does SSH tunneling differ from ordinary encrypted remote access in a security context?

SSH tunneling is a forwarding technique that carries other traffic through an encrypted SSH session, not just a method for remote login. Ordinary encrypted remote access mainly protects the administrative channel. Tunneling can hide application traffic, bypass network filtering, and support exfiltration or lateral movement, which makes governance and monitoring requirements much stricter.

Why SSH Tunneling Changes the Security Conversation

SSH tunneling is not just “encrypted remote access with a different name.” It creates a forwarding path that can carry arbitrary application traffic inside an SSH session, so the security question shifts from protecting a login channel to governing what that channel can conceal, reach, and move. That matters because visibility, segmentation, and egress policy can all be weakened when the tunnel becomes a general-purpose transport layer.

For security teams, the important distinction is that ordinary remote access is usually evaluated as an administrative control, while tunneling is also a traffic-transport control. Once users or systems can wrap other protocols inside SSH, network monitoring and perimeter filtering lose some of their usual inspection leverage. NHI Management Group’s Ultimate Guide to NHIs — Key Challenges and Risks is useful here because the same governance pattern appears whenever long-lived access paths outlive the visibility around them.

In practice, many teams discover the control gap only after a tunnel has already become the preferred way to reach an internal service or move data out of it.

How SSH Tunneling Works in Practice

SSH tunneling uses the SSH connection as an encrypted carrier for other network flows. In local forwarding, a client forwards traffic from a local port through an SSH server to a destination service. In remote forwarding, the destination is exposed back through the SSH host. Dynamic forwarding behaves more like a SOCKS proxy, letting the user route multiple destinations through one encrypted session. In all three cases, the key security feature is also the main governance challenge: the transport is encrypted, but the payload may be anything from a harmless database query to a covert management path.

That has practical consequences. If the organisation allows SSH broadly, tunneling can become a workaround around segmentation rules, application allowlists, or proxy inspection. Logging may show only an SSH session to a trusted host, while the actual target service remains hidden inside the tunnel. This is why tunneling policy often needs to be more specific than remote-login policy. Security teams should separate the question “may this user or system log in?” from “may this host forward arbitrary traffic?” and from “may this traffic leave the network boundary unchanged?” The OWASP Non-Human Identity Top 10 is relevant when SSH access is tied to service accounts, automation, or machine credentials, because the tunnel then inherits the lifecycle risks of that non-human access path.

  • Use forwarding only where there is a documented business need and an identifiable destination.
  • Constrain which accounts, hosts, and source networks may initiate tunnels.
  • Log tunnel creation, duration, and destination metadata separately from ordinary SSH logins.
  • Review whether the tunnel bypasses DLP, proxy, or segmentation controls that would otherwise inspect the same traffic.

These controls tend to break down when SSH is treated as a universal admin backdoor, because the encrypted channel makes arbitrary forwarding hard to distinguish from legitimate remote maintenance.

Where the Security Trade-off Becomes Material

Tighter tunneling control often increases operational friction, so organisations have to balance engineer convenience against network visibility and containment. That trade-off is real, especially in environments where developers, administrators, and automation jobs all depend on SSH for different reasons. Current guidance suggests treating tunneling as a privileged capability rather than a default feature, because the same mechanism that simplifies secure access can also mask lateral movement or data exfiltration.

The main edge case is legitimate administration. A tunnel used briefly to reach a restricted database or internal management endpoint may be acceptable if it is authenticated, approved, and observable. A tunnel that persists, fans out to multiple destinations, or originates from a machine that should not hold interactive access is a different class of risk. The distinction is less about the encryption itself and more about whether the organisation can explain who created the tunnel, why it existed, what it reached, and when it was removed. NHIMG’s research on NHI visibility is relevant because hidden forwarding paths are often just another form of weakly governed machine access, and a lack of visibility is frequently what makes the issue linger. When there is no reliable inventory of who can open tunnels, the control problem usually scales faster than the network team can inspect it.

Risk and Threat Considerations

SSH tunneling introduces a material exposure because it can convert a trusted administrative channel into a covert transport path. That creates risk even when the initial SSH login is legitimate, since the tunnel can be used to bypass filtering, obscure the real destination, and move sensitive data or commands across trust boundaries.

Failure mechanism: The security model fails when defenders assume encrypted access is equivalent to benign remote administration. A tunnel can carry database, proxy, or application traffic that evades normal inspection, and a compromised account or host can use that same path for lateral movement or exfiltration without obvious protocol-level indicators.

Impact: The organisation can lose visibility into what systems are being reached, which data is leaving, and whether a privileged access path is being abused. That can turn a single SSH credential compromise into broader internal exposure, especially where segmentation and logging were designed around ordinary login behavior rather than arbitrary forwarding.

Standards & Framework Alignment

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

MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
CIS Controls v8 6 — Access Control Management SSH tunneling is a privileged access path that needs controlled authorization and review.
8 — Audit Log Management Tunnels can hide destination traffic, so session and endpoint logging are critical.
12 — Network Infrastructure Management SSH tunneling can bypass segmentation and filtering intended to govern network flows.
Recommendation — Restrict tunnel-capable access and revoke unnecessary privileged access paths promptly. Log tunnel creation, duration, and destinations so forwarding activity stays attributable. Segment allowed tunnel paths and block forwarding where it is not explicitly required.
NIST CSF 2.0 PR.AA — Identity Management, Authentication, and Access Control Remote access and tunneling depend on strong account and access governance.
DE.CM — Continuous Monitoring Tunnel traffic often evades ordinary inspection, so detection and telemetry must be explicit.
Recommendation — Apply least-privilege access rules to accounts that can initiate SSH tunnels. Monitor for unusual SSH forwarding behavior and investigate hidden transport paths.
MITRE ATT&CK T1090 — Proxy SSH tunneling is a classic proxying mechanism for hiding traffic and routing access.
Recommendation — Detect and hunt for proxy-like SSH forwarding that masks the true target service.

Practitioner Guidance

What to prioritise: Distinguish remote login from forwarding in policy and enforcement. If the use case only needs administration, do not allow general-purpose tunneling by default, and treat any exception as a separate approval class with a clear owner.

What to verify: Confirm that logs capture the tunnel endpoint, initiating account, source host, and session duration, not just the SSH connection itself. If you cannot reconstruct where the tunneled traffic went, you do not actually have control over the path.

Decision rule: If the SSH session can reach sensitive internal services or external destinations that ordinary users cannot reach, classify the capability as a privileged transport path and subject it to stronger review, monitoring, and revocation discipline than standard remote access.

Practitioner takeaway: The key judgement is not whether SSH is encrypted, but whether the organisation can still see, limit, and explain the traffic that the encryption is carrying.