Get Rewarded! We will reward you with up to €50 credit on your account for every tutorial that you write and we publish!

How to enable VNC on MacOS via SSH

profile picture
Author
JanDragon
Published
2022-01-21
Time to read
3 minutes reading time

About the author- I'm a Student, Developer, and Linux Lover...

Introduction

In this tutorial you will learn how to activate the screen transfer (VNC) on MacOS with little effort if you only have SSH access.

Prerequisites

To do the tutorial correctly you need a server/computer with MacOS with the latest version installed.

Then connect to the server via SSH.

Step 1 - Set privileges

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
Starting...
Setting allow all users to YES.
Setting all users privileges to 1073742079.
Done.

Step 2 - Allow VNC clients

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvnclegacy -vnclegacy yes 
Starting...
Set the client options.
Done.

Step 3 - Set VNC password

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvncpw -vncpw supersecret

Note: replace supersecret with your own password.

Starting...
Set the client options.
Done.

Step 4 - Restart service

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent -console
Starting...
Stopped ARD Agent.
Stopped VNC Privilege Proxy
Stopped RFB Register MDNS
Done.

Step 5 - Activate ARD (Optional)

If no ARD services have been activated on the machine before, it is also necessary to run the following command:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate
Starting...
Activated Remote Management.
Done.

Conclusion

Now you have successfully enabled screen transfer on your MacOS server. You can now connect to the server using any VNC program.

License: MIT
Want to contribute?

Get Rewarded: Get up to €50 in credit! Be a part of the community and contribute. Do it for the money. Do it for the bragging rights. And do it to teach others!

Report Issue

Discover our

Dedicated Servers

Configure your dream server. Top performance with an excellent connection at an unbeatable price!

Want to contribute?

Get Rewarded: Get up to €50 credit on your account for every tutorial you write and we publish!

Find out more