Enable remote management for Remote Desktop
To manage a client computer, you must enable remote management for it. You can do so by going to each computer and using System Preferences.
For each client computer, you can also set preferences that restrict remote access to specific users or actions, or change other settings such as showing remote management status in the menu bar or requiring a password to control the screen.
Enabling remote management doesn’t give you access to the computer, but it does let you define who has access. After enabling remote management, define Remote Desktop administrators for the computer. For information, see Set access privileges.
Note: For increased security in macOS 10.14 or later, Screen Sharing gives you view-only access when you use the kickstart
command-line tool to enable Remote Management on a Mac. If you want to both view and control the remote Mac with Screen Sharing, open System Preferences on the target Mac, click Sharing, then select the Remote Management checkbox. If Remote Management is already selected, deselect it and select it again.
Enable or disable remote management using System Preferences
On the client computer, choose Apple menu > System Preferences, then click Sharing.
If you see a lock icon, click it and enter the name and password of a user with administrator privileges on the computer.
Select or deselect the Remote Management checkbox.
Disable remote management using the command line
You need administrator privileges on the client computer to complete this task.
In Remote Desktop , enter the following command to disable remote management and deny previously available logins:
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate