4 ms·
I'm uncertain specifically what VNC connects to in the vm situation. Is it 127.0.0.1 or the address of the vm? Maybe you have screen sharing already turned on?
by m463 6y ago
I'm uncertain specifically what VNC connects to in the vm situation.
Is it 127.0.0.1 or the address of the vm?
Maybe you have screen sharing already turned on?
netstat -an -p tcp
(is anything on port 5900?)
Anyway, I use screen sharing a lot using SSH port forwarding on macos.
If a maching foo is running a vnc server, I put something like this in .ssh/config:
Host foo
(other settings)
LocalForward 5900 localhost:5900
to make screen sharing accessible, I add it to the dock.
select finder. then open a folder in finder:
command-shift-G /System/Library/CoreServices/Applications
Drag "Screen Sharing.app" to the dock.
Then log into the remote machine:
$ ssh foo
<etc>
foo$
Now back to the dock click on Screen Sharing.
It will ask you for a host name. Enter 127.0.0.1 and press connect.
this will connect to localhost:5900 which ssh will port forward to foo and dump on foo's localhost:5900
bottom line - you will connect to foo port 5900 via screen sharing.