To Change the VNC (Screen Sharing) Listening Ports on your Mac running OS X 10.11 or higher.
In Terminal: sudo nano /etc/services
change the vnc-server ports (to search CTRL-W) Look for your VNX ports – 5900 and change to whatever.
Then restart vnc-server with:
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent
-or restart Computer