Ever had to connect on graphical interface remotely and find out that it's disabled and you are far away from your computer? No matter the response, I will show you below how to enable this service via SSH.
How to start, enable VNC on reboot and give rights on your user (replace PASSWORD with whatever you want):
leetmac:~ florian$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw [color=red]PASSWORD[/color] -restart -agent -privs -all -users florian
Starting...
Activated Remote Management.
Stopped ARD Agent.
florian: Set user remote control privileges.
florian: Set user remote access.
Set the client options.
Done.
How to stop and disable VNC on reboot:
leetmac:~ florian$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off
Starting...
launchctl: Error unloading: com.apple.screensharing
Removed preference to start ARD after reboot.
florian: Set user remote access.
Done.
For more information, check the documentation of kickstart command:
leetmac:~ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart --help
Please find below few examples:
Stop the Remote Management service:
kickstart -stopStop the Remote Management service and deactivate it so it will not start after the next computer restart:
kickstart -deactivate -stopRestart the agent:
kickstart -restart -agent -consoleActivate the Remote Management service and then restart the agent:
kickstart -activate -restart -agent -consoleActivate the Remote Management service, enable access, and restart the agent:
kickstart -activate -configure -access -on -restart -agentDisable user access:
kickstart -configure -access -offGive admin and bob all access:
kickstart -configure -access -on -privs -all -users admin,bobUse Directory Server accounts for authentication. Users must be a member of one of the ARD directory groups to authenticate:
kickstart -configure -clientopts -setdirlogins -dirlogins yesDisable the Remote Management menu extra:
kickstart -configure -clientopts -setmenuextra -menuextra noAllow access for only these users (the users must be specified in a separate command) (OS X 10.5 and later):
kickstart -configure -allowAccessFor -specifiedUsersAllow access for all users and give all users full access (OS X 10.5 and later):
kickstart -configure -allowAccessFor -allUsers -privs -allStart the Remote Management service (OS X 10.5 and later):
kickstart -activate- Log in to post comments
- 22875 views