Remotely Turn on and Off OSX Screen Sharing

1.  SSH to your machine.

2.  Enable Remote Sharing (VNC) via:

sudo /System/Library/CoreServices/RemoteManagement/ -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypass -restart -agent -privs -all

3.  Login using your VNC client.  I used Chicken of the VNC.

4.  You can disable Remote Sharing by:

sudo /System/Library/CoreServices/RemoteManagement/ -deactivate -configure -access -off

Leave a Reply

Your email address will not be published. Required fields are marked *