SSH tunnelling in Catalina to use Screen Sharing (VNC)

1k views Asked by At

I am using the following to try and ssh tunnel to a remote machine via a master one:

ssh -J [email protected] [email protected] -L 5900:localhost:5900
Password:
Password:
bind [::1]:5900: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 5900
Could not request local forwarding.

This works perfectly on Mojave (executing vnc://localhost afterwards in a new Terminal window). But in Catalina, no. I get: You cannot control your own screen.

About port 5900 already in use, I ran sudo lsof -i tcp:5900 and I can't see any process using that port.

1

There are 1 answers

1
HimmelKino On

I finally made tunnelling work in Catalina:

First ssh -J [email protected] [email protected] -L 5901:localhost:5900.

Then open 'vnc://localhost:5901' in a new Terminal window.