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