SSH Cheat Sheet/Forward stdio to another host

Use -W for direct stream forwarding.

Section: Jump Hosts and Proxies

Forward stdio to another host

bash
bash
ssh -W target.internal:22 bastion.example.com
Explanation

Use -W for direct stream forwarding.

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
Connect through a jump host
Reach an internal host via a bastion.
OpenIn sheetbashsame section
Chain multiple jump hosts
Traverse more than one bastion.
OpenIn sheetbashsame section
ProxyCommand with netcat
Tunnel through another host using ProxyCommand.
OpenIn sheetbashsame section
Request forwarding changes on master
Add or adjust forwarding via an existing master connection.
OpenIn sheetbash2 tag match
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