Mac: If you’re running two Macs with iCloud support (and both use 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, 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 enabled. Head to System Preferences > Sharing and turn on at least File Sharing and Remote Login. With everything set, you can now remotely 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:
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 [email protected][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 done, 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]