Skip to content
Back to Series SSH from Scratch
Networking

Jump Host and ProxyJump: Multi-Server SSH Infrastructure

Manage many servers through one entry point: bastion concepts, ProxyJump, chained keywords, and secure patterns across networks from lab to production.

A
Alif Afriza Author
· · 3 min read
Jump Host and ProxyJump: Multi-Server SSH Infrastructure

When your infrastructure grows into many servers spread across mutually isolated networks, you cannot leave every port open to the internet. A jump host (bastion) is a single trusted entry point, and ProxyJump makes that hop transparent.

The Isolated Network Problem

A typical example: your database and application servers can only be reached from a single gateway server (deploy/management), while your laptop sits outside. Without a jump host, you open the firewall and expose a large attack surface.

A jump host centralizes access: only one server accepts connections from the outside, and the other servers listen only on the internal network.

ProxyJump (-J)

Modern OpenSSH clients have the -J option, which hops through one or more hosts:

ssh -J gerbang [email protected]

What this means: SSH to gerbang first, then from there to 10.0.0.5. Authentication at both the first hop and the destination hop uses your key, carried securely through the chain.

Put it in ~/.ssh/config to keep things more concise:

Host gerbang
    HostName 203.0.113.99
    User admin

Host internal
    HostName 10.0.0.5
    User app
    ProxyJump gerbang

Now ssh internal automatically goes through the gateway.

Chaining ProxyJump

For layered networks (lab → staging → production), ProxyJump can be chained:

ssh -J lab,staging produksi

Each host in the list is traversed in order. In the config, write ProxyJump lab,staging. Make sure the authentication at each hop uses a key that host permits.

The Mature Bastion Concept

A good bastion applies the hardening principles from the previous article: only selected keys, no passwords, no root, and monitored logs. Beyond that, consider:

  • Agent forwarding is not enabled by default: for hopping, agent forwarding (ssh -J) is safer with ProxyJump because the key never leaves your laptop.
  • Active logging on the gateway: journalctl -u ssh audited regularly.
  • MFA on the gateway as an extra layer, because the gateway is the only door.
  • Regular updates for the gateway: the most critical machine is often the one most frequently forgotten.

An Alternative Building Block: WireGuard / Tailscale

Sometimes an “isolated network” is easier to solve with a mesh VPN (such as WireGuard or Tailscale) that removes the need for many hops. In that pattern, every server appears to be on a single network, and SSH becomes direct:

ssh [email protected]

The combination of a jump host plus a VPN is very rarely needed at the same time; choose the simplest option that works. This article focuses on jump hosts, while WireGuard is covered separately in the VPN curriculum.

Debugging the Chain

When a hop fails, use -vvv:

ssh -vvv -J gerbang internal

Also check at every hop: whether AllowUsers permits your user, whether the target port is open (ss -tlnp), and whether the firewall is blocking traffic between hosts.

Closing

Jump hosts and ProxyJump let you manage many servers without opening hundreds of ports to the internet: one guarded bastion, with everything else hidden on the internal network. This is the standard pattern for clean, secure infrastructure.

Next in the curriculum: finally, we take apart the details of the SSH protocol: ciphers, KEX, and the handshake, so that you no longer trust SSH blindly.

References

  • The ssh_config(5) man page, sections ProxyJump and ProxyCommand.
  • The ssh(1) man page, section -J destination.
  • OpenSSH release notes (the introduction of the ProxyJump option, openssh.com/releasenotes.html).
  • NIST SP 800-52 Rev 2, Guidelines for the Selection, Configuration, and Use of TLS (a reference for cryptography and secure configuration).
Open for Contributors

Your ideas deserve to be read by thousands of people.

ByteNesia is built for everyone. If you have experience, tutorials, or opinions about technology, write and share them here. Your name will be credited as a contributor.

Write anything: tool reviews, homelab tutorials, security tips, or your tech stories.

Discussion & Comments