I am trying to enable VNC (Screen Sharing) on my Mac running OS X Yosemite
I have been able to run this command sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist
(source) to turn VNC on.
The only issue running this command is, it sets a password automatically, in which I do not know what it is, I have to fix it by logging in physically to the computer.
Is there a way how I can enable VNC via SSH and setting the password as the users password?
Best Answer
If you need to set a VNC password - you might need to also kickstart the ARDAgent, you can use this command instead of just loading the plist:
The analogous command for using user/password of existing users would be:
More detail and discussion at:
How to enable OS X screen sharing (VNC) through SSH?