Linux: SSH Tunnel to local machines.


Sun Aug 28 2022 02:02:49 GMT+0000 (Coordinated Universal Time)

Saved by @marcopinero #bash

$> ssh <remote user>@<remote server ip> [-p <remote ssh port>] -L <remote server port>:<internal target ip>:<internal target port> -fN

#Redirect web traffic throughout, port 9999, to local machine, port 80.

$> ssh -L 9999: -fN

#So you can access: "http://localhost:9999/"
#This url will respond as it was ""

Use this commands (ssh) for opening ssh tunnel to get access to LAN machines through ssh server. Use -p option if remote ssh port is not 22.