- Author
- Ivan Velichko (iximiuz Labs)
- Published
- Last updated 23 July 2026
- Kind
- Hands-on tutorial with seven labs
- Original
- labs.iximiuz.com/tutorials/ssh-tunnels
- Subject
- Software tools and craft
What it is
Ivan Velichko explains SSH tunnels. The tutorial helps readers remember which flag and which address order to use.
What it says
- Local forwarding with ssh -L makes a remote service available on a local port.
- The -L target can be any machine the SSH server can reach.
- To reach a loopback-only port behind a bastion, the tutorial adds the -J flag.
- With ssh -R, the gateway listens only locally unless GatewayPorts is set to yes.
- Dynamic forwarding with ssh -D turns the SSH client into a local SOCKS proxy.
- Using ssh -R with no destination makes the server a SOCKS proxy, from OpenSSH 7.6.
- The mnemonic is that the left-hand side of the flag value opens a new port.
What evidence it gives
Seven labs give commands and expected output on a playground of four hosts. The diagrams and the cheat sheet image were not viewed. No commands were run for this page.
Interests and limits
The author created the hosting site, which asks readers to sign up for labs. It covers OpenSSH only. The diagrams were not viewed and the labs were not run.