How to ssh tunnel to a remote server in linux
In our project, we regularly deploy our app to one of our clients servers via their VPN.
After successful deployment, we need to verify the app of course. Usually you can type the IP address with the app's port on the browser.
Recently, one of our clients have turned off the direct browser access and permitted only via SSH tunneling.
Using the below command, we can tunnel our local request to remote server including the port forward.
$ ssh -N [email protected] -L 8080:localhost:8080
|N||No shell after this|
Now the 8080 port of the ashokma.com server is tunneled to through our localhost:8080.
-fflag to keep the session running in the background.