• 0 Comments
  • 0 Recommendations

Remotely access your Mac

Mobile Mac

You’re on the road, it’s the night before your big presentation, and after a long day of travel you fire up your Mac to do a last-minute check on your slides. That’s when you realize that you forgot to bring them with you—that the presentation your business’s future depends on is sitting on your Mac at home, hundreds of miles away.

With a little forethought and preparation, this wouldn’t be a problem. You’d just log in to your home computer and retrieve the file via FTP. But you can’t log in to a remote computer if you don’t have its Internet Protocol (IP) address. And if you’re like most of us, your Internet service provider assigns your computer a dynamic IP address that changes all the time. Fortunately, there is a workaround, using an Internet technology called dynamic DNS.

What is dynamic DNS?

DNS, or Domain Name System, translates addresses like www.macworld.com into numeric IP addresses that Net routers can understand. When you type a domain name such as www.macworld.com in your Web browser, your Mac asks your ISP’s DNS servers for the corresponding IP address, which it then uses to take you to the Web site you want.

Dynamic DNS providers assign your computer a plain-English name that stays the same even when your IP address changes. To connect to your home Mac, you just have to remember that name.

Getting started

Several companies offer dynamic DNS services. (See this comprehensive list.) For this column, I’ll use DynDNS as an example, but the instructions are similar for other providers.

The first thing you need to do is set up an account. With DynDNS, that means going to www.dyndns.org and clicking on Sign Up Now to get started. Once you’ve created an account, log in with your new user name and password, click on My Services, and then click on Add Host Services. Select Add Dynamic DNS Host from the list that appears.

Now it’s time to select your Mac’s plain-English Net address. That address has two parts: The first part, which comes before the first period in your address (the dmoren in dmoren.dyndns.org), is called the host name. That can be anything you want, as long as someone else hasn’t registered it already. Fill in the name you want and then open the drop-down menu next to the host-name field.

This menu is where you choose the second part of your address, the domain name, which is everything after the first period. Dynamic DNS offers an extensive list of domain names, ranging from the bland (dyndns.org) to the quirky (boldly-goingnowhere.org) to the oddly specific (is-a-chef.net). Your choice here is largely a matter of taste (unless you’re going to be hosting a business Web site on your home Mac, in which case it’s also a question of marketing); the important thing is to choose a name you’ll remember.

The next field down, IP Address, should already be filled in with your current IP address. Those are the only fields you need to worry about, so once they’re complete, click on Add Host (see top screenshot).

Enabling the Daemon

At this point, your home Mac has a nice, easy-to-read Net address. But that address will last only as long as your current IP address, which could change at any moment. DynDNS provides software that runs on your home Mac and continuously keeps the DynDNS database abreast of those changes, so your new Net name will always point to your Mac.

To install that software, click on Support in the DynDNS navigation bar, and then click on Update Clients in the list on the left. If you aren’t automatically routed to the page for the OS X client, click on Macintosh/OS X Client. Select the link that will download a program called DynDNS Updater.

Once you’ve downloaded, unzipped, and launched DynDNS Updater, you’ll be asked for an administrator password so you can install the client’s daemon. This is the small program that runs in the background and keeps the DynDNS servers up-to-date with your IP address.

When the daemon is installed, click on the Add User button in DynDNS Updater. In the sheet that appears, enter the name and password for your DynDNS account. If you leave the Auto-Setup From DynDNS Server option selected, the app will automatically fill in the rest of the details for you. Then click on the triangle next to your user name to show the host names associated with that account. Select the Active check boxes next to both your user name and the host name. When the Status column reads “OK” for both, you’re all set, and you can quit the program. (The daemon will continue to run; if you want to keep a close eye on your dynamic DNS host names, you can install the included Dashboard widget.)

Putting dynamic DNS to use

So now you have a dynamic DNS host name. But how do you use it? Let’s get back to our nightmare scenario. Before you left on your business trip, you had the foresight to configure your home Mac for just such an emergency. You enabled file sharing on your home computer by going to the Sharing preference pane and enabling Personal File Sharing. You also selected the Remote Login option, so you can use Secure FTP to transfer files.

From your hotel room, you fire up your favorite SFTP client. (Or if you prefer Terminal, you can use OS X’s built-in command-line client). No matter which client you use, enter your dynamic DNS address and the short user name and password for your OS X user account when the client asks for a server. The folders and files in your Home directory should appear.

But dynamic DNS is hardly a one-trick pony. You can also use it to set up a simple Web site on your Mac: Go back to the Sharing preference pane and enable Personal Web Sharing. Then create your site in Apple’s iWeb (for details on that process, see “The Weekend Web Site,” July 2006 ). When you’re done, choose the Publish To A Folder option and save the files in the Sites folder of your Home directory. Your new page’s address will be your dynamic DNS address followed by a tilde (~) and your OS X short user name: hostname. dyndns.org/~ shortusername /, for instance.

Now for the caveats: Some ISPs don’t like customers running servers on their home computers, so make sure to check your terms of service. More seriously, you may be concerned about the security of enabling remote access to your Mac—and rightly so. If you’re using a firewall, make sure that it’s leaving the requisite ports open. OS X’s built-in firewall is pretty smart about this, but some third-party firewalls may not be as alert. If you’ve enabled Personal File Sharing, you’ll need to leave ports 427 and 548 open. If you’re using remote login, leave port 22 open. And if you’re hosting a Web site, leave ports 80, 427, and 443 open. (Those are the defaults; check the Sharing preference pane just to be sure.)

You also need to make sure your Mac is awake when you try to access it. To do that, go to the Energy Saver preference pane and tell it to either keep your Mac awake at all times or wake it up when you need access. For more on this, see No Files Left Behind.

[ Dan Moren is a freelance writer and a contributor to Macworld’s MacUser and Gadgetbox blogs .]

DynDNS lets you pick any host name you want (as long as it hasn’t been registered by someone else) and offers a long list of domain names to choose from.Once you have dynamic DNS set up on your Mac, turn on Personal File Sharing and Remote Login to get full remote access.
  • Recommend? 0 YES 0 NO
  • 0 Comments
  •  
  • Print

"Remotely access your Mac" Comments

Make Your Dreams Come True!

Enter the Dream Come True Sweepstakes Enter for a chance to win $25,000 or your choice of other great prizes in the Dream Come True Sweepstakes brought to you by Macworld.

Enter now »