Join our Newsletter — 33% off our NHI Course

Agent Forwarding

Agent forwarding lets an SSH session pass authentication requests through to another system without copying private keys to the target host. It preserves operator convenience, but it also expands the trust boundary, so transport changes must continue to support it carefully when upgrading secure access infrastructure.

Expanded Definition

Agent forwarding is an SSH feature that lets a remote session use your local authentication agent to satisfy downstream SSH authentication without copying a private key onto the intermediate host. That convenience matters in jump-host and multi-hop administration, but the trust model changes because the remote system can ask the agent to sign on your behalf while the session is active.

The practical boundary is often misunderstood: agent forwarding does not move the key itself, but it does expose the signing capability to whichever host can reach the forwarded socket. In other words, the credential material stays local, while the authorization function becomes reachable through the session. That distinction is why transport or bastion changes must preserve the behaviour intentionally rather than treating it as a harmless default.

In security operations, agent forwarding is part SSH transport design, not a separate identity standard. Its use is still evolving across teams, especially where administrators mix traditional shell access with automated provisioning, CI jobs, or layered bastion architectures.

Examples and Use Cases

Agent forwarding appears wherever operators need to authenticate to several hosts in sequence without storing private keys on each hop. It is most common in controlled administrative workflows, but it can also appear in automation when tooling shells out to SSH for cross-host tasks.

  • Logging into a bastion host and then reaching an internal server from that session without placing a private key on the bastion.
  • Running a maintenance command that requires SSH access to a second system from a trusted jump box.
  • Using remote Git operations from a build or admin host where the operator wants to avoid key duplication.
  • Supporting temporary access during incident response when a responder needs to traverse multiple internal hosts quickly.

The trade-off is convenience versus expanded trust. A forwarded agent reduces key sprawl, but every additional hop becomes part of the trust boundary because that host can request signatures until the session ends. For teams comparing access paths, the safer choice is often the one that limits which systems can see the forwarding socket at all.

Security Implications

Mismanaged agent forwarding can turn a single compromised intermediary into a pathway for broader authenticated access. The main failure condition is not key theft in the classic sense; it is abuse of the live signing capability through a host that should only have transit role, not ongoing access authority.

That is especially dangerous when administrators assume a bastion is “safe enough” and leave forwarding enabled by habit. If the session host is later compromised, an attacker may be able to pivot to other systems during the lifetime of the forwarded connection, which expands blast radius beyond the initial foothold.

NHI Management Group research shows that 92% of organisations expose NHIs to third parties, raising supply chain security concerns, and agent forwarding creates a similar trust-extension problem for privileged SSH workflows. The practitioner signal is simple: if the remote host can influence authentication on your behalf, treat that host as part of the credential trust chain, not just a transport relay.

Domain and Governance Relevance

Agent forwarding matters in NHI governance because it is often used to move through environments that contain machine access, automation hosts, and privileged service paths. Even though the feature originates in human-admin SSH workflows, the governance question changes when the session traverses systems that also host scripts, deploy agents, or other non-human identities.

In those environments, forwarding can blur ownership and auditability. A team may believe only a person is authenticated, when in practice the session can interact with systems that also carry workload credentials or operational tokens. That makes it harder to explain who or what actually possessed effective access at a given moment.

For NHI programs, the key relevance is not the SSH feature itself but the trust expansion it introduces around privileged infrastructure. It should be considered whenever access paths cross systems that manage secrets, automation, or delegated machine authority, because the same session that helps an operator move quickly can also widen the scope of what a compromised hop can reach.

Standards & Framework Alignment

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

MITRE ATT&CK and OWASP Non-Human Identity Top 10 address the attack and risk surface, while CIS Controls v8, 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
CIS Controls v8 6 — Access Control Management Agent forwarding extends access paths and should be governed as privileged access exposure.
Recommendation — Restrict agent forwarding to approved administrative paths and revoke it where it is not operationally required.
NIST CSF 2.0 PR.AC-4 — Access Permissions and Authorizations Forwarded SSH auth changes who can exercise access on the user's behalf.
Recommendation — Limit forwarded authentication to trusted hosts and validate authorization boundaries for each hop.
NIST Zero Trust (SP 800-207) AC-4 — Flow Control Policy Enforcement The feature expands the trust boundary across network hops and intermediaries.
Recommendation — Enforce trust boundaries so intermediary hosts cannot inherit broader authentication capability than intended.
MITRE ATT&CK T1021.004 — SSH Attackers commonly abuse SSH sessions and trusted access paths for lateral movement.
Recommendation — Monitor SSH jump paths for suspicious reuse of forwarded authentication during lateral movement.
OWASP Non-Human Identity Top 10 NHI-01 — Identity Lifecycle and Visibility Forwarded access can obscure who or what exercised machine-bound authentication.
Recommendation — Track every system that can relay or invoke machine authentication and remove unnecessary forwarding paths.