Over a million developers have joined DZone.

Tunnel Traffic Through SSH

To connect to a specific port on a machine inside of an internal network via a different machine that can access it and has SSH enabled.

ssh -C -L [port]:[internal hostname of machine]:[port] [public machine]

Then use whatever program to connect to, which SSH will forward on to the proper host.

Common ports include:
3389 for Microsoft Remote Desktop/Terminal Services
22 for SSH

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}