2008-10-29

Enable Mac OS X Leopard Remote Desktop for VNC via SSH

If you have SSH access to your Mac, you can remotely enable Remote Desktop. However, if you want to VNC into the Mac, you'll need to set a VNC password and turn VNC on. The following huge command turns on Remote Desktop, enables VNC, and sets the password to password.

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent -privs -all -setvnclegacy -vnclegacy yes -setvncpw -vncpw password

However, the last part doesn't seem to work, so you can run:

sudo nano /Library/Preferences/com.apple.VNCSettings.txt

and put this as a single line:

6755221DFCC7B786FF1C39567390ADCA

which is the encoding of "password". Now use SSH tunnels, connect, and it should work. You can then change the password via system Preferences to a more secure one.

To turn off Remote Desktop run:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off

3 comments:

Anonymous said...

hi,
how do i create the ssh tunnels ?
i have an xserve here that has a defect vga card and i was hoping your tutorial here could get me back in there...
i performed all the steps except logging in.......
remote desktop doesn't let me still.... password becomes password for all users? tnkx

Anonymous said...

after looking around a bit more i found that this command saved my ass;

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/

found here;
http://support.apple.com/kb/HT2370

Alex said...

Still valuable info, saved my behind.