Last updated on April 1, 2021
In this post, we gonna enable enable VNC in the Amazon Mac EC2 instance.
Open your terminal and SSH into the amazon Mac Instance. If you don’t have the password for the ec2-user, execute the below steps to set a password or you can skip it.
# SSH into mac.
$ ssh -i [your private key.pem] ec2-user@[your public ip address]
Set password for ec2-user
$ sudo passwd ec2-user
Follow the on screen instructions for password setup.
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
-activate -configure -access -on \
-configure -allowAccessFor -specifiedUsers \
-configure -users ec2-user \
-configure -restart -agent -privs -all
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
-configure -access -on -privs -all -users ec2-user
After executing above steps you can connect to MAC via VNC.