3

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?

Oleg
  • 61

3 Answers3

2

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

0

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

AllowTcpForwarding yes
Caleb
  • 11,921
0

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