I recently needed to access the GUI of my Mac at work from home. Alas, Apple Remote Desktop Sharing was turned off.
Here’s how to turn on Remote Desktop Sharing from the command line. This assumes you have Remote Login (SSH) turned on in system preferences. If not, you’re hosed.
1. Open Terminal.app, and enter:
ssh -l jblow my.workmac.com
where ‘jblow’ is a valid username on your Mac, and ‘my.workmac.com’ is the host name and domain name of your machine.
2. Activate Remote Desktop Sharing for a specific user, enabling access priveleges for that user, and grant full access priveleges for that user (keep all the command options on one line):
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users jblow -privs -all -restart -agent -menu
Here’s the output to expect:
Starting...
Created preference to start ARD after reboot.
Stopped ARD Helper.
Stopped ARD Agent.
Stopped ARD Database.
Stopped VNC Server.
jblow: Set user remote control privileges.
jblow: Set user remote access.
Started ARD Agent.
Done.
Note that this technique causes ARD to start at boot time as well.
To turn off ARD and deactivate it (so that it doesn’t load at boot time):
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off
Starting...
Removed preference to start ARD after reboot.
jblow: Set user remote access.
Done.
Hey thanks for this tip. It saved me a lot of work.
Pingback: Apple Remote Desktop via Terminal einschalten — instant-thinking.de