Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So I'm connecting to a computer through ssh, and it has a port open that I can only connect to using localhost. Is there any way I can forward that port to my local machine?

Setup:

My machine -> SSH server

As of now, I can only lynx SSH sever:port, but I'd like to be able to do My machine:some port and have all traffic be sent to SSH server:port. Is there any way I can do that?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Does this work ?

ssh yourlogin@sshserver -L someport:127.0.0.1:serverport

With :

  • someport = the port in 'Your Machine:some port'
  • serverport = the port in 'server:port'

I didn't try it with 127.0.0.1, but usually with an IP visible only from the server I'm SSHing to. I'm interested to know if this is working (but don't known why it will not work)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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