SSH & Remote Administration
Tunnel your local ports through a jump host in one go
🧩 The Challenge
Setting up a multi-hop SSH tunnel usually feels like building a house of cards. You end up with multiple terminals open and manually chaining connections just to reach a database locked away in a private subnet.
💡 The Fix
Use the ProxyJump flag to let your local SSH client handle the heavy lifting of chaining the connection for you. It keeps your local config clean and stops you from having to daisy-chain manual tunnels.
ssh -J jumpuser@jump-host:22 user@target-host:22 -L 8080:localhost:5432 -N
⚙️ Why It Works
Passing the -J flag tells your client to perform an SSH handshake with the jump host before initiating the final connection to the target. It essentially treats the first server as a simple relay so you can treat the destination like it’s right on your local network.
🚀 Pro-Tip: Stick this in your ~/.ssh/config under a Host entry so you never have to type the flags again.
Linux Tips & Tricks | © ngelinux.com | 11/2/2026
