Bind to a Remote Port Using SSH
July 10, 2023 —
Gregg Szumowski
If you are trying to access the web page of an application running on a remote machine and you find that you are blocked, you can bind to it using SSH with similar parameters to this:
$ ssh [email protected] -L 8384:127.0.0.1:8384 -N
Where:
[email protected]is the remote server,8384is the port number on the remote that you wish to connect with,127.0.0.1:8384is the local machine and the port that you want to redirect to, and-Nis a flag tellingsshnot to execute a remote command.