Last Updated: February 25, 2016
·
2.155K
· destructuring

SSH to OSX with short hostnames

If you've enabled Find My Mac in the iCloud System Preferences, you get an IPv6 hostname that tunnels back to your workstation. Here's my setup to use workstation shortnames like "mikan" and "alice" no matter where those computers are.

First, you have to override your resolv.conf's domain search with your iCloud specific subdomain.

The subdomain with your iCloud ID looks like "XXX.members.btmm.icloud.com". You can find "XXX" with the last line from:

dns-sd -E

In your ~/.ssh/config, use IPv6 for iCloud hosts:

Host *.members.btmm.icloud.com
  AddressFamily inet6

1 Response
Add your response

Or you can just add the server URL in Search Domains in your Network panel of System Preferences.

over 1 year ago ·