Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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/ 

Copy and paste the contents of 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/ -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 for the command then. – Arjan Mar 29 '10 at 14:13

You must log in to answer this question.