Skip to content →

Tunnel with ssh and port forward

This opens a ssh tunnel to and forwards the $remoteport to the $localport on our local machine:

If you want to forward from to another host, that e.g. is only reachable via, you can use this to forward $remoteport from host.local via to $localport on your local machine

These commands also do not open a login shell. You don’t get a command prompt on

Published in Cheat Sheet


Leave a Reply

Your email address will not be published. Required fields are marked *