Stop fumbling with SSH agent forwarding when you just need a key once

SSH & Remote Administration

Stop fumbling with SSH agent forwarding when you just need a key once

🧩 The Challenge

Dealing with untrusted jump hosts usually means I have to choose between copying my private key to a box I don’t trust or spending ten minutes fighting agent forwarding. Neither option is one I want to explain to the security team during an audit.

💡 The Fix

Use SSH ProxyJump to tunnel through the intermediary entirely, keeping the keys local to your machine where they belong. It makes the remote server act like it’s a direct hop.

ssh -J user@jumpbox:22 user@target-host:22

⚙️ Why It Works

Instead of letting the jump host handle your authentication, this command builds a direct pipe to the target. Your local ssh client handles the handshake directly with the destination, meaning your local key never touches the untrusted middle-man’s memory.

🚀 Pro-Tip: Put the ProxyJump config inside your ~/.ssh/config file for the specific host and stop typing the full string every single time.

Linux Tips & Tricks | © ngelinux.com | 10/19/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted