Remotely enable VNC on OS 10.5 (Leopard) with SSH
If you find yourself needing to get remote VNC access to your Apple computer running Leopard, you can do it remotely as long as you have an SSH connection to the machine. This is especially helpful because the default configuration for Apple’s remote desktop only allows you to connect from another Mac. You need to set a generic VNC password if you want to connect via a VNC client running in Linux or Windows. Here’s how.
- Connect to the remote machine via SSH.
- Enter the following command, as all one line:
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -activate -access -on -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw [your password] -restart -agent
- This will set the remote Mac to allow legacy VNC connections from non-Macs and allow you to use the password you chose with the -vncpw option (note there should be no brackets around your actual password) to connect from any VNC client.
- I have found that often you will also need to kill the AppleVNCServer process after running this command before you can connect. Just type killall AppleVNCServer and it should let you connect. You can also find the PID through the top command, then type kill <process #>.
I originally found this solution in an Apple forum thread that has an interesting discussion about the subject.