Latest Tweets:

Remote SSH using Back To My Mac

onethingwell:

If you have more than one Mac running OS X Lion and you’re signed in to the same iCloud account on all of them, you can SSH between them via iCloud’s IPv6 network.

First, find your Back To My Mac account number by running

dns-sd -E

Then SSH to another machine like so

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

That’s hard to remember and a hassle to type, so might want to add something like the following to your ~/.ssh/config:

Host mac-remote
User username
HostName computername.123456789.members.btmm.icloud.com
AddressFamily inet6
Protocol 2

Which means you can just type

ssh mac-remote

to log in to your other Mac when you’re out and about.

Very handy.

Update 24/07/2012

Reader TJ wrote in to say:

If you don’t want to hard code your Back To My Mac address into your .ssh/config you can get it dynamically using this line:

echo show Setup:/Network/BackToMyMac | scutil | sed -n 's/.* : *\(.*\).$/\1/p'

  1. nebolsin reblogged this from onethingwell
  2. macsnippets reblogged this from minimalmac
  3. youtalk reblogged this from onethingwell
  4. klaatu reblogged this from onethingwell
  5. kunihara reblogged this from yoppa
  6. gardinho reblogged this from minimalmac
  7. shiborenai reblogged this from onethingwell
  8. 6x3 reblogged this from onethingwell
  9. tetranium reblogged this from onethingwell
  10. tkusano reblogged this from onethingwell
  11. u-pic reblogged this from onethingwell
  12. junkoco reblogged this from onethingwell
  13. banwanko reblogged this from onethingwell
  14. yoppa reblogged this from onethingwell
  15. d6rkaiz reblogged this from onethingwell
  16. technicalthaumaturgy reblogged this from onethingwell
  17. godsowndump reblogged this from minimalmac and added:
    Neat!
  18. behrends reblogged this from onethingwell