I’m trying to screen share from a MacBook to a VM running Ubuntu on Parallels on a MacBook Pro on the same network. I can ssh to it fine, but using the same account and IP address in MacOS screen sharing I get:
“Connection Failed to “10.0.0.160”. Unable to communicate with “10.0.0.160”. Make sure the remote computer is available and the firewall is not blocking screen sharing.”
On the Ubuntu side netstat shows that Ubuntu is listening on Port 5900, which I think is the right port.
In MacOS screen sharing I’ve entered “vnc://email@example.com:5900", as well as just about every reduced version down to just “10.0.0.160”.
You are using port 5900, which corresponds to display port :0. Display port zero is used for the physical display, and the VNC server may not be able to share that one. Try starting a virtual display on your ubuntu server by logging into the server with ssh and running the "vncserver" command (or whatever is the correct command for whatever vnc server you are using). Then use the port corresponding to the display you created. For example, if you have a VNC server running on display port :1, then connect on port 5901.
If you really need to share the physical display of the ubuntu server, there is some information on that here: https://www.howtoforge.com/tutorial/how-to-start-a-vnc-server-for-the-actual-display-scraping-with-tigervnc/. (I have not tried that myself.)