Skip to Main Content

Remote SSH Into Your Home Mac Through iCloud's Network


If you're running two Macs with iCloud support (Lion or Mountain Lion), then you can use iCloud's network to remote SSH back into your home computer no matter where you are with just a few lines in Terminal.

The process is detailed by weblog One Thing Well, but you need to set up a few things before you get started. First off, you need to make sure Back to My Mac is enabled in iCloud (System Preferences > iCloud > Back to My Mac). Next, you need to set up your home computer for sharing if it isn't already. Head to System Preferences > Sharing and turn on at least File Sharing and Remote Login. With everything set, you can now remote log in to your home computer using iCloud's network wherever you have internet access.

The first thing you need to do is find your Back to My Mac account number. In Terminal (Applications > Utilities), type:

dns-sd -E

The final, nine digit number is your Back to My Mac account number. Next, it's time to SSH into your other machine:

ssh -2 -6 username@computer-name.[account number].members.btmm.icloud.com

If you don't know your username or computer name, head to System Preferences > Sharing on the destination computer and click on Remote Login. Your Computer name is listed at the top (if it's multiple words use the address with the dashes). Your username is listed on the line below Remote Login right before the @ symbol. You will need to do this before you try to SSH into your computer when you're away.

With that, you should have access to your Mac no matter where you are. Head over to One Thing Well for a few more tricks and shortcuts for using the iCloud network to remote SSH.

Remote SSH using Back To My Mac | One Thing Well