I have a web server running on port 8000 on remotehost. I set up a tunnel from localhost:

    ssh -L 8888:localhost:8000 remotehost

However when I try to request localhost:8888 I get:

    channel 3: open failed: connect failed: Connection refused

on the terminal. Why does the connection fail? How should I fix it?

link|improve this question
On remotehost, what happens if you do "telnet 127.0.0.1 8000"? – MadHatter Oct 30 '10 at 6:24
feedback

3 Answers

Sounds like there's nothing on that port on the other side at localhost:8000. Use netstat to verify that something is listening.

link|improve this answer
feedback

In your sshd_config file on the remotehost do you have this?

AllowTcpForwarding yes
link|improve this answer
feedback

Try connecting to localhost:8000 on remotehost. It could be that there is no program running on that port.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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