I have a service running on a certain port at the server. What I want to do is, access the server using SSH and use a local (client-side) program to access the server's port. Is that possible?


Connecting to a port on a server via an ssh tunnel can be done with the -L local port forwarding option.

For example, to connect to www.example.com:80 & to make it available on the client as port 8080, you would do:

ssh -L8080: www.example.com

This allows you to go to in your browser & have www.example.com:80 available. You can also have www.example.com connect to another host instead of itself, making the tunnel into a proxy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.