SSH Cheat Sheet/Connect through a jump host

Reach an internal host via a bastion.

Section: Jump Hosts and Proxies

Connect through a jump host

bash
bash
ssh -J bastion.example.com user@private.internal
Explanation

Reach an internal host via a bastion.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Jump Hosts and Proxies
Chain multiple jump hosts
Traverse more than one bastion.
OpenIn sheetbashsame section
ProxyCommand with netcat
Tunnel through another host using ProxyCommand.
OpenIn sheetbashsame section
Forward stdio to another host
Use -W for direct stream forwarding.
OpenIn sheetbashsame section
Connect to a host
Open an interactive SSH session.
OpenIn sheetbash1 tag match
Use a specific private key
Choose a private key explicitly.
OpenIn sheetbash1 tag match
Start a master connection
Open a reusable control connection for later sessions.
OpenIn sheetbash1 tag match