Rstudio server port forwarding

Like this user:

I am trying to perform SSH port forwarding, but I'm trying to do it over the google cloud platform. I know I have RStudio Server working, because I can allow open port 8787 to TCP, and log-in that way. But that isn't super secure, so I'd like to do SSH port forwarding instead.

When I run:

gcloud compute ssh <vm-name> \
    --project <project-id> \
    --zone <zone> \
    -- -NL 1080:localhost:8787

I get no errors, but I don't see anything at localhost:1080. Any suggestions for how to debug would be great. Thanks!

In principle this does look correct. You could add debug output by adding -v, -vv or even -vvv to the SSH options after --.

Yep, problem seems to be around here:

debug1: Remote: /home/user/.ssh/authorized_keys:2: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: /home/user/.ssh/authorized_keys:2: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Connection to port 1080 forwarding to localhost port 8787 requested.
debug1: channel 2: new [direct-tcpip]
channel 2: open failed: connect failed: Connection refused
debug1: channel 2: free: direct-tcpip: listening port 1080 for localhost port 8787, connect from ::1 port 59609 to ::1 port 1080, nchannels 3
debug1: Connection to port 1080 forwarding to localhost port 8787 requested.
debug1: channel 2: new [direct-tcpip]
channel 2: open failed: connect failed: Connection refused
debug1: channel 2: free: direct-tcpip: listening port 1080 for localhost port 8787, connect from ::1 port 59612 to ::1 port 1080, nchannels 3
debug1: Connection to port 1080 forwarding to localhost port 8787 requested.
debug1: channel 2: new [direct-tcpip]
channel 2: open failed: connect failed: Connection refused
debug1: channel 2: free: direct-tcpip: listening port 1080 for localhost port 8787, connect from ::1 port 59619 to ::1 port 1080, nchannels 3
debug1: Connection to port 1080 forwarding to localhost port 8787 requested.
debug1: channel 2: new [direct-tcpip]
channel 2: open failed: connect failed: Connection refused
debug1: channel 2: free: direct-tcpip: listening port 1080 for localhost port 8787, connect from ::1 port 59624 to ::1 port 1080, nchannels 3
debug1: Connection to port 1080 forwarding to localhost port 8787 requested.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.