ssh port forwarding

Make a local port accessible from a remote server.

Make sure the server sshd_config have GatewayPorts yes

+--------------+ +--------------+ |localhost:4000| |localhost:8080| |local computer|->>-|vps server | | | | | +--------------+ +--------------+
ssh -R 8080:localhost:4000 user@

The traffic on the vps server port 8080 will be forwarded to your local computer port 4000.

Access a remote port from local computer.

+--------------+ +--------------+ |localhost:4000| |localhost:8080| |local computer|-<<-|vps server | | | | | +--------------+ +--------------+
ssh -L 4000:localhost:8080 user@


Adding the flag -nNT will not open a shell on the remote server.

Stay up to date

Sign up for the mailing list and get notified via email when new blog posts come out.