Enable and access OS X remote desktop through SSH?
5,528
On your Mac at home:
If you have set the VNC password on your home Mac ... copy the contents of the file below:
/Library/Preferences/com.apple.VNCSettings.txt
If you haven't set VNC password at home, go to
System Prefs->Sharing->Computer Settings
and set password then copy the string from the file as above.
On remote machine:
sudo emacs /Library/Preferences/com.apple.VNCSettings.txt
Copy and paste the contents of com.apple.VNCSettings.txt from the home Mac to that .txt file on the remote Mac
Then try sending this command over ssh to the remote Mac:
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientops -setvnclegacy -vnclegacy yes
A VNC connection should work now between home and the remote site.
Related videos on Youtube
Author by
Admin
Updated on September 17, 2022Comments
-
Admin over 1 year
I'm on vacation and need to run a GUI program on my Mac at home. I can get to a console through SSH, but otherwise the machine is behind a firewall. How can I...
- Enable VNC from the command line
- Tunnel that through SSH to my MacBook
Thanks!
-
Arjan about 14 yearsAssuming it works: nice! As the SSH security may be good enough, I guess any password for plain VNC will do. So, to use "welcome", use this as the contents of that file:
60513D0DE4C5A0E2FF1C39567390ADCA
. (That is: this works for my Snow Leopard Mac. No newline in that file.) -
Arjan about 14 yearsAnd if you have an Apple Screen Sharing client, then no need to allow for plain VNC access. See support.apple.com/kb/HT2790 for the command then.
-
Tomeamis over 3 yearsSince edits must be at least 6 chars, I'm putting this here: In the last command there is a typo.
-clientops
should be-clientopts