Grab Files from Your Mac While Miles Away – Mac Kung Fu, 2nd Edition

Tip 372Grab Files from Your Mac While Miles Away

There are a variety of ways of accessing files on your Mac’s hard disk while you’re away from it. Of course, for these tips to work, your Mac will need to be left turned on when you’re not sitting in front of it, and you’ll have to ensure it isn’t set to go into sleep mode after a period of inactivity (look at the Energy Saver settings within System Preferences).

Using the Back To My Mac Service

The easiest and most fuss-free way of accessing files is to use the Back To My Mac service, which is offered as part of iCloud (see Exploring OS X: iCloud). However, this can be accessed only via another Mac.

Back To My Mac makes it seem like the home Mac and remote Mac are on the same local area network—as if they’re in the same home or office. It does this via a secure tunnel across the Internet.

Back To My Mac requires both the home Mac and the Mac you’re using to access the files to be signed in with the same iCloud ID.

Some setup is necessary, as follows:

  1. On the home Mac, open System Preferences (Apple menuSystem Preferences), and then click the iCloud icon. Then check the Back To My Mac box. Note that you might see a warning about enabling Universal Plug ’n’ Play or NAT Port Mapping on your Internet router, and if so, you should consult the router’s documentation. Back To My Mac will work without this enabled but will be slower than it could be.

  2. Click the Show All button in System Preferences, and then click the Sharing tab. Check File Sharing.

  3. There’s no need to select a folder to share because, by default, those logging in with the username and password of an account get access to that user’s home directory automatically.

  4. When done, close System Preferences.

  5. On the remote Mac, you’ll need to repeat step 1 to enable Back To My Mac, but there’s no need to repeat steps 2 and 3 to enable File Sharing.

Once you’ve enabled Back To My Mac on the remote Mac, the home Mac will appear in the Finder sidebar under the Shared heading, where you can click it to automatically log in and access its files. Remember that in all likelihood file transfer will be pretty slow!

When you’ve finished transferring files, click the Eject button alongside the computer’s entry.

Sharing Files Using SSH

OS X features SSH, software that allows command-line logins from remote computers across a network or the Internet. A component of this software is SFTP, which is essentially a secure version of File Transfer Protocol (FTP), which you might have encountered if you’ve ever created a website. SFTP lets you retrieve and transfer files from a computer without the risk of snoops (although on your Mac it is supported only at the command line and not via Finder).

SSH can be enabled by starting System Preferences (Apple menuSystem Preferences) and then opening the Sharing pane. Check the Remote Login box in the list on the left. On the right you can allow either all of the users on the system to log in remotely or just some (although this is moot if you’re the only user of your system).

You can use SFTP from the command line of another computer if it has the correct software, but most graphical FTP clients include SFTP support.

Remember that you’ll also need to ensure your Internet router hardware allows SFTP connections. This can be done within its configuration panels. There is no need to deactivate or alter any setting of the OS X firewall—it is automatically opened to allow incoming SSH/SFTP connections.

Configuring FTP

For what it’s worth, OS X includes a standard FTP server that you can enable by typing the following:

sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist

This will run in the background as a service, and there will be no sign it’s running. It will persist across reboots. To permanently deactivate FTP, type the following:

sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist

However, bear in mind that every security expert agrees that FTP is too unsecure to use, especially when SFTP is available, which in terms of features is virtually indistinguishable yet is encrypted throughout.