Marc Goldberg's Blog
OS X tip of the day: remote desktop & ssh tunnel

From time to time I want to do something on my home computer from work that’s just plain easier to do with a mouse than with terminal. Since we have Apple Remote Desktop at the office, this is super easy, though this will work with any VNC software.

One time setup:
• While you’re still at home: configure your router to forward a port (any port, we’ll pick 11523 for fun) to port 22 on the computer you want to control.

• Make life easy and use a service like DynDNS to give your home router a DNS name that you can remember.

At the office:
• Fire up terminal and run
ssh -p 11523 -L 5900:127.0.0.1:5900 home.redtilde.com

• Now you can use ARD (or Chicken of the VNC, etc) to connect to localhost (port 5900 is the default for ARD clients).

That’s it!