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

后端 未结 8 632
北恋
北恋 2020-12-02 15:28

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 F

8条回答
  •  离开以前
    2020-12-02 16:02

    ssh -v -L 8783:localhost:8783 myacct@server.com
    ...
    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.

提交回复
热议问题