Enabling VNC access via ssh

If you need to connect via a VNC client in Windows or such and don’t have ARD around, just login to the system via ssh and run the following (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 Leopard system (and probably Tiger too) to allow legacy VNC connections from non-Macs and allow you to use the password you chose with the -vncpw option to connect from any VNC client.

You may also have to kill the AppleVNCServer process before you can successfully connect. Type

killall AppleVNCServer

. You can also find the PID through the ‘top’ command, then type kill .

Advertisements