Well, there're few prerequisites to this method:
- You should have a DMZ'ed (or accessible from outside world in some way) server running in your home network which you can SSH into.
- Your home Mac should be on (you can use etherwake command from within your network to wake it up first).
As long as these two criteria are met, you simply do:
laptop:~ kirillov$ ssh -p19322 -L59000:imac:5900 firstname.lastname@example.org -fN
you need only if you're running your SSH daemon on a non-standard port (or your forwarding is set from a non-standard port); either way, it is highly recommended. This piece
says "I want to forward all requests coming on port 59000 of my localhost to host imac in the target network, port 5900" (which is a default VNC port). Finally,
is pretty straightforward, "-fN" says "go to background right after asking for login and password if they are needed".
After you've done that, all you need to do it to hit ⌘K in your Finder (or start a dedicated VNC application) and do:
After that you're likely to be asked for login and password, which, by coincidence will be login and password from your home Mac. And you're in!