WZ-IT Logo

SSH Bastion and Jump Host: How It Works, Hardening and Mesh-VPN Alternatives

Timo WevelsiepTimo WevelsiepUpdated: 30.06.2026

Editorial note: Versions, commands and prices may change. Please verify critical steps independently before production use. This guide does not replace individual consulting.

Planning remote access without open SSH ports? WZ-IT builds sovereign remote-management platforms - from a hardened jump host to an identity-based mesh. Explore our remote-management platforms

An SSH bastion or jump host is a single, hardened server through which all SSH access to an internal network flows. Instead of exposing every server to the internet, only the bastion is reachable; all target systems sit behind it with no public IP. The modern, secure path through it is ProxyJump (ssh -J), not agent forwarding. This guide explains how a jump host works, how to harden it, and when a mesh VPN or ZTNA replaces the jump server.

Table of Contents


How a Jump Host Works

The jump host is a deliberate choke point: every SSH connection into the internal network passes through this one server, so you only have to secure, monitor and log a single place. The internal target systems have no public IP and accept SSH only from the internal segment.

Today this is implemented with ProxyJump. The OpenSSH client first connects to the bastion and opens a TCP forward to the target through it. The actual SSH session is encrypted end to end between your machine and the target - the bastion only relays the data stream and never sees plaintext or your key. ProxyJump has been available since OpenSSH 7.3 (2016) and replaces the older, clunkier ProxyCommand (openssh.com). The current release is OpenSSH 10.3 (April 2026); since OpenSSH 10.0 (April 2025) the authentication code has been split into a separate sshd-auth binary with its own isolated address space (openssh.com/txt/release-10.0).

On the command line the -J flag is enough:

# Straight through the bastion to the internal target
ssh -J jump.example.com 10.0.10.20

# Multiple hops (each hop only needs to reach the next)
ssh -J jump1.example.com,jump2.internal 10.0.20.30

No special server-side configuration is required - the bastion just needs to reach the target and you need SSH access to the bastion. scp, rsync and sftp also work transparently over the same path.

ProxyJump Instead of Agent Forwarding

For a long time agent forwarding (ForwardAgent yes) was the go-to way to authenticate to internal hosts from the bastion. It is risky, though: while your session is open, anyone with root or file access on the jump server can reach the forwarded agent socket. The private key material cannot be read, but the attacker can make the agent sign authentication challenges and impersonate you to any server that trusts your key (man.openbsd.org: ssh_config).

ProxyJump is the clearly safer option here: instead of forwarding the agent, the client only relays stdin/stdout through the bastion. Your key stays on the workstation and the jump server never sees it. A compromised bastion therefore cannot abuse your identity.

Practical recommendation: set AllowAgentForwarding no on the bastion. Use agent forwarding only where it is genuinely needed (for example a Git push from the target system) - and even then keep it narrow and short-lived.

Hardening the Bastion Host

Because the bastion is the only entry point, it must be especially robust. The key measures:

  • Key-only authentication: PasswordAuthentication no, PermitRootLogin no. Prefer ed25519 keys (the default key type in OpenSSH 10.x).
  • Second factor (MFA): AuthenticationMethods publickey,keyboard-interactive combined with a PAM TOTP module. Cleaner still is binding to an identity provider via SSO and MFA - for example with Authentik or Keycloak.
  • Restrict features: X11Forwarding no, PermitTunnel no, AllowTcpForwarding only where needed. For automation or transfer accounts use ForceCommand or a restricted shell so no interactive access or port forwarding is possible.
  • Source IP filtering: inbound only port 22 from known networks, refined with Match Address rules.
  • Logging and recording: ship sshd logs and optionally a session recording (auditd, tlog) to an external SIEM. Logs belong off-host - locally an attacker with root could alter or delete them. We use Wazuh for this; see the fundamentals in RBAC and audit for remote access.
  • Short-lived certificates instead of key sprawl: an SSH CA (such as step-ca or Vault) issues short-lived user certificates. This eliminates scattered authorized_keys files and manual rotation.
  • Patch and monitor: a public bastion is an attack target. Run a current OpenSSH version and back it with CVE monitoring and a regular security audit.

Public Bastion or Internal Jump Host

Not every jump host sits on the internet. Two patterns are worth distinguishing:

  • Public bastion: sits in the DMZ and is the only host reachable from the internet. Maximum hardening is mandatory because it is scanned constantly.
  • Internal jump host: not publicly exposed at all and reachable only over a VPN or mesh. It separates zones from one another - classically OT from IT - and forces maintenance access to take a controlled crossing. Background in OT/IT segmentation, DMZ and remote access.

Secure architectures combine both: no direct internet access to the jump host, but first into the overlay network, then through an internal, segmenting jump host to the machine.

Bastion or Mesh VPN: When to Keep the Jump Server

A bastion is simple and effective, but it remains a public target and a single point of failure. Modern zero-trust mesh VPNs like NetBird take a different approach: every participant builds the connection outbound-only, there is no open inbound port, and access is identity-based and default-deny.

Criterion SSH bastion / jump host Mesh VPN / ZTNA (NetBird)
Open inbound port yes (port 22 on the bastion) no (outbound-only)
Attack surface one public host no exposed port
Access model network choke point identity-based, default-deny
Setup minimal, no client rollout client/agent per peer
Audit centralize sshd logs identity-aware, per identity
Distributed sites one bastion per site one overlay across all sites

Choose a bastion when you have few admins, use classic SSH and want a minimal, well-understood setup without a client rollout. Choose mesh VPN/ZTNA when you connect many distributed sites with no open ports and need granular least-privilege access plus a clean, identity-bound audit trail. NetBird's identity-aware SSH maps sessions directly to user identities and removes static key sprawl. Often the combination is ideal: the mesh as the network backend, with an internal jump host inside it for segmentation.

Step by Step: Base Configuration

  1. Isolate the jump server: dedicated minimal VM/container, firewall allows inbound TCP 22 only from defined source IPs. Target systems have no public IP.

  2. Harden sshd_config (on the bastion):

PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
AllowAgentForwarding no
X11Forwarding no
PermitTunnel no
AllowGroups ssh-jump
AuthenticationMethods publickey,keyboard-interactive
  1. Enable MFA: wire a PAM TOTP module (for example pam_google_authenticator) into the keyboard-interactive chain. Alternatively bind to SSO/OIDC or use short-lived certificates.

  2. Configure the client (~/.ssh/config on the workstation):

Host jump
    HostName jump.example.com
    User admin

Host internal-*
    ProxyJump jump
    User ops

After this you reach internal hosts directly, for example ssh internal-db01 - the hop through the bastion happens transparently, without agent forwarding.

  1. Centralize logging: ship sshd logs to an external SIEM, optionally session recording via auditd/tlog.

  2. Optional: certificates instead of static authorized_keys, rolled out via an SSH CA.

How We Approach This at WZ-IT

For new, distributed environments we rarely rely on a classic, internet-exposed bastion. Instead we connect sites outbound-only over an identity-based mesh (NetBird) and put an auditable browser gateway on top - no open SSH port facing the internet. Where an internal jump host makes sense as a segmentation point, we harden it consistently: key-only, MFA, ProxyJump, restricted shell and centralized logging. What this looks like in production is shown in the ABCO Water Systems case study for distributed plants in Australia. On request we handle design, build and operations end to end as part of our remote-management platforms.

This article is general information and not legal advice.

Further Guides

Want to plan the right mix of bastion and mesh? Book an intro call or take a look at our remote-management platforms.

You'd rather not run Remote Access yourself? WZ-IT handles setup, operations and maintenance – GDPR-compliant from Germany.

Frequently Asked Questions

Answers to the most important questions

A bastion or jump host is a single, hardened server through which all SSH access to an internal network flows. Only that host is reachable; every target system sits behind it with no direct exposure. This shrinks the attack surface to one controlled entry point with centralized logging.

ProxyJump (since OpenSSH 7.3, the -J flag) tunnels the SSH connection through the bastion to the target. Client and target are encrypted end to end and the bastion only relays. Unlike agent forwarding, your private key and agent socket never reach the jump server, so a compromised bastion cannot abuse your identity.

With ForwardAgent enabled, anyone with root or file access on the jump server can use the forwarded agent socket while your session is open. The key material itself cannot be read, but the attacker can make the agent sign authentication challenges and impersonate you to downstream servers. ProxyJump avoids this.

Key-only authentication (PasswordAuthentication no, PermitRootLogin no), a second factor (PAM TOTP, SSO or short-lived certificates), disabling agent, X11 and tunnel forwarding, ForceCommand or a restricted shell for automation accounts, source IP filtering, external centralized logging with session recording, and a patched OpenSSH (10.3 as of 2026).

A public bastion sits in the DMZ and is the only host reachable from the internet. An internal jump host is not publicly exposed and is reachable only over a VPN or mesh; it typically separates zones, for example OT from IT. The two can be combined for defense in depth.

A mesh VPN like NetBird makes sense when you connect distributed sites with no open inbound ports, need identity-based least-privilege access (default-deny) and a clean audit trail. A bastion still fits for few admins, classic SSH and a minimal setup without client rollout. Often a combination is ideal.

Yes, as a hardened single entry point it remains a proven pattern, especially with ProxyJump and short-lived certificates. But it is a public target and a single point of failure that must be patched. Zero-trust mesh approaches with no open ports increasingly replace it in distributed environments.

Let's Talk About Your Idea

Whether a specific IT challenge or just an idea - we look forward to the exchange. In a brief conversation, we'll evaluate together if and how your project fits with WZ-IT.

E-Mail
[email protected]

Leading companies trust WZ-IT

  • Rekorder
  • Keymate
  • Führerscheinmacher
  • SolidProof
  • ARGE
  • Boese VA
  • NextGym
  • Maho Management
  • Golem.de
  • Millenium
  • Paritel
  • Yonju
  • EVADXB
  • Mr. Clipart
  • Aphy
  • Negosh
  • ABCO Water Systems
Timo Wevelsiep & Robin Zins - CEOs of WZ-IT

Timo Wevelsiep & Robin Zins

Managing Directors of WZ-IT

1/3 - Topic Selection33%

What is your inquiry about?

Select one or more areas where we can support you.