There is a computer I don't have immediate access to that I cannot screenshare with it. I have an account on the computer and have screenshared before with it.

I believe some setting has been changed to deactivate screensharing.

Is there a way to activate screensharing through ssh?

My computer is OS 10.6.8. I'm not sure what the other one is but probably the same.

  • I'm not able to answer right now, but I suspect the solution may involve osascript and the "System Events" application. More later if someone else hasn't already worked out an answer.
    – Daniel
    Commented Oct 4, 2011 at 20:55

1 Answer 1


To enable remote management (including screensharing), issue the following command over ssh:

Note: This command sets your vnc password to 'mypasswd' as set by the -vncpw flag in the command, you should change this.

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all

To disable the remote management, issue the following command over ssh:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off
  • nice. that worked great.
    – BeauGeste
    Commented Oct 4, 2011 at 21:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .