Skip to main content

SSH ProxyJump

·376 words·2 mins
Posts ssh tunnel
Table of Contents
SSH - This article is part of a series.
Part 7: This Article
ProxyJump is actually a specialized form of automated tunneling.

While port forwarding (tunneling) is the broad/manual mechanism of routing network traffic through an SSH connection, ProxyJump is a native OpenSSH shortcut, like invisible highway, designed specifically to chain SSH sessions together without exposing local ports.

In short, ProxyJump handles the entire multi-hop process automatically inside a single command.

ProxyJump
#

ProxyJump creates a single end-to-end SSH session through the specified jump hosts. It was introduced in OpenSSH 7.5 to simplify access to servers that sit behind firewalls or live in private networks.

In fact, it is a specialized form of automated SSH tunnelling or SSH port forwarding.

Why ProxyJump?
#

  1. Enhanced security by keeping target environment off the public Internet.
  2. Eliminate agent forwarding risks where a compromised jump host that hijacks local SSH key.
  3. Provide native tool integration such as scp, rsync, sftp.

Comparison
#

FeatureProxyJump (-J)Port Forwarding (-L/-R)
PurposeConnecting SSH client to an SSH server through an intermediary SSH serverRoutes any TCP traffic (HTTP,VNC,DB) from a local port to a remote destination
Config.Zero-config (automatic)Requires choosing local/remote ports
CleanlinessLeaves no dangling local portsKeeps a local port occupied while open
SecurityEnd-to-end SSH session onlyEncrypted only between SSH client and gateway

Here’s a mechanical comparison to achieve the same goal using both methods.

Goal: accessing a private database server (10.0.0.5:3306).

The Port Forwarding Method (Tunnelling)

# Step 1: Create the tunnel 
# (maps local port 5555 to remote database via bastion)
ssh -L 5555:10.0.0.5:3306 user@bastion.com

# Step 2: Open a new terminal and connect your database client locally
mysql -h 127.0.0.1 -P 5555 -u db_user -p

The ProxyJump Method

ssh -J user@bastion.com user@10.0.0.5

If there is a case of having a complex network topology that requires multiple transitions, we can chain multiple jump hosts together by separating with commas:

ssh -J user@jump1,user@jump2 user@target

Common Use Cases
#

  1. Accessing Cloud VMs by automating the chain movement from bastion to the private server.
  2. Allow remote administration to servers which not accessible on the public Internet.
  3. Accessing development environments that locating at different network zone.
  4. Emergency troubleshooting without VPN access.
  5. Provide compliance and audit-ready access controls by monitoring and logging the accesses that funneled through a single entry point (bastion host).
SSH - This article is part of a series.
Part 7: This Article

Related

SSH Tunnelling
·559 words·3 mins
Posts ssh tunnel
Bypass firewall and safely access hidden services by wrapping network traffic inside a secured SSH tunnel.
Tunnelling with SSH Port Forwarding
·1310 words·7 mins
Posts 101 cli ssh tunnel
Quick notes on tunnelling with SSH port forwarding.
SSH Socket-Based
·342 words·2 mins
Essential Posts socket ssh
Using socket activation is recommended wherever possible.