SSH -L connection successful, but localhost port forwarding not working "channel 3: open failed: connect failed: Connection refused"

user2762495

My lab runs RStudio on a server. A couple weeks ago, from my cousin's house, I successfully ssh'd into the server and pulled up the server-side RStudio through my local Firefox browser. Now when I try to access the server RStudio from home (via my own router), it doesn't work. I need help troubleshooting, and I'm guessing it's some problem on the router. I'm running Mac OSX 10.6.8. No idea what the university server's running, but I don't think it's a server-side problem.

Here's how it worked the first time I did it, at my cousin's house: first, I VPN into the university network; then I call SSH with port forwarding; then I open a Firefox browser, connect to my localhost port, and it opens up RStudio on the server side which I can access through my local browser window.

Here's the problem I'm having right now when I try to log-in from my home network:

I can make the VPN connection successfully. I can also set up SSH successfully with this command: ssh -v -L 8783:localhost:8783 [email protected]

Here are the last several lines of the verbose output from the successful ssh command:

debug1: Authentication succeeded (password).
debug1: Local connections to LOCALHOST:8783 forwarded to remote address localhost:8783
debug1: Local forwarding listening on 127.0.0.1 port 8783.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on ::1 port 8783.
debug1: channel 1: new [port listener]
debug1: channel 2: new [client-session]
debug1: Entering interactive session.
Last login: Mon Sep  2 04:02:40 2013 from vpnipaddress

So I think I'm still succeeding at the VPN and SSH stage (though I don't know why it says my last login was Sep 2 when I've logged in a few times since then).

Next, I open Firefox, and I type localhost:8783, and instead of getting an RStudio server app through my browser window, I get the following errors:

In the Firefox browser window, it says: Server not found, Firefox can't find the server at www.localhost.com, Check the address for typing errors etc.

In the terminal window, it says:

debug1: Connection to port 8783 forwarding to localhost port 8783 requested.
debug1: channel 3: new [direct-tcpip]
channel 3: open failed: connect failed: Connection refused
debug1: channel 3: free: direct-tcpip: listening port 8783 for localhost port 8783, connect from 127.0.0.1 port 50420, nchannels 4

I'm not sure what I've got wrong. I haven't changed anything on my laptop since my last successful connection. I'm on my own router (instead of my cousin's), so maybe I need to mess with the firewall? I already allowed ports 22 and 8783 to come through the firewall to my laptop (I'm not even sure I needed to do that though). Help?

Kenster
ssh -v -L 8783:localhost:8783 [email protected]
...
channel 3: open failed: connect failed: Connection refused

When you connect to port 8783 on your local system, that connection is tunneled through your ssh link to the ssh server on server.com. From there, the ssh server makes TCP connection to localhost port 8783 and relays data between the tunneled connection and the connection to target of the tunnel.

The "connection refused" error is coming from the ssh server on server.com when it tries to make the TCP connection to the target of the tunnel. "Connection refused" means that a connection attempt was rejected. The simplest explanation for the rejection is that, on server.com, there's nothing listening for connections on localhost port 8783. In other words, the server software that you were trying to tunnel to isn't running, or else it is running but it's not listening on that port.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

ssh tunnel error : channel 3: open failed: connect failed: Connection refused

From Dev

channel 3: open failed: connect failed: Connection refused

From Dev

Single step ssh port forwarding not working but only works when ssh port forwarding performed separately on remote jump-server and remote-localhost?

From Dev

ssh dynamic port forwarding with remote (-g) is not working

From Dev

Port Forwarding to enable ssh remote access is not working

From Dev

ssh local port to local port forwarding; connection refused

From Dev

ssh settings `permitopen="localhost:4000"` does not limit remote port forwarding

From Dev

Port forwarding using SSH with different users: how to debug connection problems?

From Dev

Port forwarding using SSH with different users: how to debug connection problems?

From Dev

ssh alias with localhost forwarding

From Dev

SSH tunnel Port forwarding

From Dev

Router Port Forwarding and SSH

From Dev

SSH Port forwarding

From Dev

SSH Port Forwarding Service

From Dev

SSH port forwarding

From Dev

Local port forwarding in SSH

From Dev

SSH local port forwarding

From Dev

SSH Port forwarding on Windows

From Dev

ssh inside network not working after port forwarding on router

From Dev

Port forwarding no longer working

From Dev

Virtualbox port forwarding not working

From Dev

Port forwarding not working for port 9

From Dev

Forwarding a Localhost:Port to an ExternalIP:NewPort

From Dev

Port forwarding capture on localhost with WireShark

From Dev

ssh: connect to host localhost port 22: Connection refused

From Dev

SSH :connect to host localhost port 22: Connection refused

From Dev

SSH tunnel, port forwarding and services

From Dev

VPN equivalent to SSH port forwarding?

From Dev

Port Forwarding/SSH Tunneling Dilemma

Related Related

  1. 1

    ssh tunnel error : channel 3: open failed: connect failed: Connection refused

  2. 2

    channel 3: open failed: connect failed: Connection refused

  3. 3

    Single step ssh port forwarding not working but only works when ssh port forwarding performed separately on remote jump-server and remote-localhost?

  4. 4

    ssh dynamic port forwarding with remote (-g) is not working

  5. 5

    Port Forwarding to enable ssh remote access is not working

  6. 6

    ssh local port to local port forwarding; connection refused

  7. 7

    ssh settings `permitopen="localhost:4000"` does not limit remote port forwarding

  8. 8

    Port forwarding using SSH with different users: how to debug connection problems?

  9. 9

    Port forwarding using SSH with different users: how to debug connection problems?

  10. 10

    ssh alias with localhost forwarding

  11. 11

    SSH tunnel Port forwarding

  12. 12

    Router Port Forwarding and SSH

  13. 13

    SSH Port forwarding

  14. 14

    SSH Port Forwarding Service

  15. 15

    SSH port forwarding

  16. 16

    Local port forwarding in SSH

  17. 17

    SSH local port forwarding

  18. 18

    SSH Port forwarding on Windows

  19. 19

    ssh inside network not working after port forwarding on router

  20. 20

    Port forwarding no longer working

  21. 21

    Virtualbox port forwarding not working

  22. 22

    Port forwarding not working for port 9

  23. 23

    Forwarding a Localhost:Port to an ExternalIP:NewPort

  24. 24

    Port forwarding capture on localhost with WireShark

  25. 25

    ssh: connect to host localhost port 22: Connection refused

  26. 26

    SSH :connect to host localhost port 22: Connection refused

  27. 27

    SSH tunnel, port forwarding and services

  28. 28

    VPN equivalent to SSH port forwarding?

  29. 29

    Port Forwarding/SSH Tunneling Dilemma

HotTag

Archive