How to Enable the macOS Screen Sharing VNC Server via the kickstart Command

Remote Management on macOS

macOS includes a highly optimized, built-in VNC (Virtual Network Computing) server known as “Screen Sharing.” When enabled, it allows you to remotely control the Mac’s desktop interface from another Mac, a Windows PC, or even an iPad. Normally, you enable this by navigating to System Settings > General > Sharing and checking the “Screen Sharing” box.

However, if the Mac is located in a server rack with no monitor attached (headless), or if you only have an SSH connection to the machine, you cannot click the GUI boxes. You must enable the VNC server directly from the command line using the powerful kickstart utility.

The Apple Remote Desktop (ARD) Kickstart Utility

The kickstart command is buried deep within the macOS system framework. Because it modifies core security and remote access policies, you must execute the command using sudo (administrative privileges).

Step 1: Enable Screen Sharing for All Users

Connect to the target Mac via SSH (or open the local Terminal app). To instantly start the VNC server and grant remote desktop access to all users who currently have an account on the machine, run the following command exactly as written (it is a single, long line):

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

Press Enter, provide your administrator password, and press Enter again.

Understanding the Flags

  • -activate: Enables the Remote Management service.
  • -configure -access -on: Configures the firewall and access lists to allow incoming VNC connections.
  • -restart -agent: Restarts the background daemon to apply the changes immediately without requiring a full system reboot.
  • -privs -all: Grants full control (mouse, keyboard, file transfer) rather than just “observe only” mode.

Step 2: Connecting to the Mac

Once the command is executed, the VNC server is live.

  • From another Mac: Open Spotlight (Command + Space), type Screen Sharing, press Enter, and type the IP address of the newly configured Mac.
  • From a Windows PC: Download any standard VNC client (like RealVNC or TightVNC), enter the Mac’s IP address, and provide the Mac’s username and password when prompted.

How to Disable the VNC Server via Terminal

Leaving a VNC server running on a machine that doesn’t need it is a severe security risk. If you are finished with your remote configuration, you should shut down the Screen Sharing service.

Run the following command in the Terminal to instantly kill the VNC server and block incoming connections:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off

The remote connection will be immediately terminated.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.