Enabling or Restarting Apple Remote Desktop Remotely

The following grant access to all users. This is useful if you’ve
mistakenly restricted access to a few and have locked yourself out.

For ARD versions below 3.2

sudoĀ /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstartĀ \  
-activate -configure -access -on -restart -agent -privs -all

For ARD versions above 3.2

sudoĀ /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstartĀ \  
-configure -allowAccessFor -allUsers -privs -all