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.

it looks like a simple case, but I cannot make it work. We have an internal CI (Continous Integration) application running on our internal server (lets say its address it ciserver.com and the application is running on the port 8080, so we have ciserver.com:8080). I was told I can get to this server from outside of our office by tunneling through one of our servers (lets say it's address is myserver.com). On my Mac I tried the following command:

ssh -N -L -f 6666:ciserver.com:8080 username@myserver.com

I was promped for the password, which I entered.

In my browser I tried: http://127.0.0.1:6666 but the webpage did not load. Any suggestions what I did wrong?

Thanks!

share|improve this question
    
Finally, I got it working. Command: ssh -N -L 2345:ciserver.com:8080 username@myserver.com did the trick, but I don't really know why the first approach did not work as it's basically the same. –  Jakub Mar 17 '12 at 12:50
add comment

1 Answer 1

I think you may have the command line arguments in the wrong order. Try ...

ssh -N -f -L 6666:ciserver.com:8080 username@myserver.com

You can check if the port forwarding has been created by executing netstat.

netstat -a -p tcp

and look at the entries in the LISTEN state. There should be a line similar to ...

Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp4       0      0  *.6666                 *.*                    LISTEN
share|improve this answer
add comment

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.