Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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...

  1. Enable VNC from the command line
  2. Tunnel that through SSH to my MacBook


share|improve this question

1 Answer 1

On your Mac at home:

If you have set the VNC password on your home Mac ... copy the contents of the file below:


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.

share|improve this answer
Assuming 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 Mar 29 '10 at 14:10
And 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. –  Arjan Mar 29 '10 at 14:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.