A couple hours ago I realized I may need to connect to my Hackintosh this weekend while I'm out of town. Turns out, there are some really cool tools to do this securely for only $2! It took me a bit more than an hour to set up, so I thought I'd write an entry for future reference.
In this tutorial, I'll be setting up both VNC and SSH on OSX 10.6 and connecting to it over 3G using an iPhone 3GS.
The first thing you need to do, is set up a VNC server. There are a number of free VNC servers for OSX that you can download, and I chose to go with Vine Server. You can use the default configurations and simply start the server.
Next, you'll need to open up a port on your router so that incoming requests won't be rejected. The standard port for SSH is 22. I followed this tutorial for opening up my port. Basically, all I had to do was:
- Open up my router's control panel by typing http://192.168.1.1/ into my address bar. If you don't know your router's default password like me, you can look it up here.
- Find the section in the settings where you can add port forwarding, and for the port put 22 and for the IP address, use the internal IP address of your machine that the VNC server displays. This will be something like 192.168.1.101. If you can't find the settings for port forwarding, this port forwarding tutorial site has good instructions for a number of routers.
- Download an iPhone VNC client app such as Remoter VNC. This one costs $1 for basic VNC connections and has an additional $1 addon for SSH connections.
- For the SSH hostname, enter the IP address of your home computer. If you don't know this, just go to http://www.whatsmyip.org/ and it will tell you.
- For the SSH username and password, use the username and password for your Mac.
- For the VNC hostname, enter the internal IP address of your home computer. This is the one that looks something like 192.168.1.101.
- For the VNC port, enter 5900.
- If you set up a VNC password, be sure to enter that as well.