First, create a script called /pathto/yourscripts/startvncserver as follows:
#!/bin/tcsh[This is a three line script; remove the line break after the "5901" when entering it.]
cp /pathto/yourscripts/.osxvnc-passwd /tmp/osxvnc-passwd
/Applications/OSXvnc.app/Contents/MacOS/OSXvnc-server -rfbport 5901
-desktop "OSX VNC 1" -rfbauth /tmp/osxvnc-passwd &
Save it wherever you save your own scripts, and make it executable (i.e. chmod 755 startvncserver).
The next step is to make the osxvnc-passwd file. All you need to do is start a VNC server via the GUI (with a password), and copy /tmp/osxvnc-passwd to /pathto/yourscripts/.osxvnc-passwd
All set! Now you can SSH to your machine, start VNC with your new script, and then connect via the GUI.
Note: A user must be logged into the console at the remote machine, or I don't think this will work. I'm going to test it without being logged in and I'll post a comment with the results.

