Want to access remote webserver. The setup is like this:
LinuxDesk --> jumpuser@sshserver --> sshuser@webserver
Above all of them are linux servers. web service is running on 8080 port. How to access webservice from desktop by creating ssh tunnel.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityWant to access remote webserver. The setup is like this:
LinuxDesk --> jumpuser@sshserver --> sshuser@webserver
Above all of them are linux servers. web service is running on 8080 port. How to access webservice from desktop by creating ssh tunnel.
You can set up two tunnels:
(simple or reverse) LinuxDesk:port1 -> sshserver:port2
- the port numbers don't have to be 8080
(simple or reverse) sshserver:port2 -> webserver:8080
You'd then end up with the service at your LinuxDesk at the port port1
.
Probably you want a reverse tunnel to the webserver and also a reverse one to the sshserver, but possibly not.
For implementation see man ssh
. Just look there for "tunnel".
localhost:8080
if you tunnel like localhost:8080 -> sshserver:port2
in the LinuxDesktop
. I'm not sure if it will be also available there if you tunnel your outgoing interface, eg. 192.168.0.x
. You can check, but you can simply use localhost
.