How to Launce and Remote access Amazon Mac EC2 instance
In this blog, we are focusing more on connecting Mac instance from any OS in using remote desktop, I will write less about launching Mac instance because there is a good guide on AWS document
First of all, to launch the mac instance, you have to allocate a Dedicated host, but there is a problem, by default limit of a Dedicated host is 0 so you have to contact AWS support and tell them to increase the dedicated host limit
for launching Mac instance follow this AWS guide https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-mac-instances.html#mac-instance-launch
also, add SSH while configuring a security group in launch time of instance
after you successfully launched the mac instance now connect it with SSH and follow the below steps
step one: Set up a password for the ec2-user account using the passwd command as follows.
[ec2-user ~]$ sudo passwd ec2-user
step two: Start the Apple Remote Desktop agent and enable remote desktop access as follows.
[ec2-user ~]$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \ -activate -configure -access -on \ -restart -agent -privs -all
Step three: From your computer, connect to your instance using the following ssh command. In addition to the options shown in the previous section, use the -L option to enable port forwarding and forward all traffic on local port 5900 to the ARD server on the instance.
ssh -L 5900:localhost:5900 -i /path/my-key-pair.pem ec2-user@my-instance-public-dns-name
download VNC Viewer from here for your operating system or use build-in screen sharing if you are using mac os
now open VNC or any other ARD you have
write localhost in address for the host
Log in as prompted, using
ec2-user as the user name and the password that you created for the ec2-user account in step one
there you go,
Thanks for reading