# for <= Mac OS X 10.6.2 do:
sudo sh -c "/bin/echo -n enabled > /Library/Preferences/com.apple.ScreenSharing.launchd"
# for >= Mac OS X 10.6.3 do:
sudo sh -c "/bin/echo -n enabled > /private/etc/ScreenSharing.launchd"
# for Mac OS X Lion do: (use unload to disable)
sudo launchctl load -w com.apple.screensharing.plist
This post contains all these hints:
I personally just tested the second variant for 10.6.8 so this is all I can confirm. The other variants were just taken from this post above to have it all in one place.