Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Change default vnc-server port in Catalina

I've been unable to change the port in /System/Library/LaunchDaemons/com.apple.screensharing.plist

and for the life of me I cannot get the read only file to change. I have turned off the System Integrity Protection in order to change the file and it still will not let me edit it. I've used vi, vim and nano with no luck. My account has admin rights and I've sudo su'd into root, I've logged directly into the system as root and no matter what I do I cannot edit the read only file. I need to change the standard ports as I am setting up a Mac Mini as a remote home server for my rental property 5000 miles away and need it to be a reliable work horse so I won't need to pay someone every time I need a simple reboot... I also don't want to open port 5900 to the world. Would love to hear how to get this done. Thanks in advance!

Mac mini, macOS 10.14

Posted on Jan 4, 2020 11:44 PM

Reply
Question marked as Best reply

Posted on Jan 30, 2020 6:49 AM

Configure port mapping in your router to take incoming traffic on a different port to go to port 5900 on your mac.


In my environment, after changing the public port from 5900 in the AirPort Utility settings, I was able to share with the changed port.


Similar questions

4 replies

Feb 9, 2020 7:39 PM in response to Chris98vf

A better option is to configure the router to point to a custom SSH port on the Mac. First SSH into the Mac, then use your VNC viewer to connect to the VNC port on the Mac since VNC is not secure. To make the SSH connection even more secure you could configure to use keys instead of passwords to connect.


Here is an old article from 2004 which explains very nicely how to configure this type of connection on a Mac. While it mentions using third party apps, I do not believe they are necessary today. I'm referencing it because it explains the SSH connection more clearly than most other articles:

http://preserve.mactech.com/articles/mactech/Vol.20/20.07/VNCOverSSH/index.html


Here is another article for setting up a VNC connection over an SSH tunnel on a Mac:

http://preserve.mactech.com/articles/mactech/Vol.20/20.07/VNCOverSSH/index.html


Here is an old Apple article about how to configure macOS to allow remote access to the server including Screen Sharing:

https://support.apple.com/guide/server/allow-remote-access-apd55d36a80/mac

Feb 9, 2020 7:27 AM in response to Chris98vf

Ports on your computer are not "open to the world". Your computer is on a private network, the world can not route to your computer. You were correctly advised how to configure your router. Everyone in the world who uses VNC uses port 5900, but no one has access to every user's port 5900 on their computer located behind a router managing a private network.

Change default vnc-server port in Catalina

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.