60
57

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

iCloud の どこでも My Mac で SSH ログインする

Last updated at Posted at 2014-03-14

OSX 10.9.2 では以下のようにしてできた

dns-sd -E でドメインをしらべる。

hoge@iMac:~$ dns-sd -E
Looking for recommended registration domains:
DATE: ---Fri 14 Mar 2014---
16:44:20.839  ...STARTING...
Timestamp     Recommended Registration domain
16:44:20.839  Added     (More)               local
16:44:20.840  Added                          icloud.com
                                             - > btmm
                                             - - > members
                                             - - - > 999999999

icloud.com 以下の階層を逆順につなげたアドレスを dns-sd -B _ssh にわたして、
どこでも MyMac に登録されている機械を一覧する。

hoge@iMac:~$ dns-sd -B _ssh 999999999.members.btmm.icloud.com
Browsing for _ssh._tcp.999999999.members.btmm.icloud.com
DATE: ---Fri 14 Mar 2014---
16:45:40.965  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
16:45:41.685  Add        3   0 999999999.members.btmm.icloud.com. _ssh._tcp.           fooMac
16:45:41.685  Add        2   0 999999999.members.btmm.icloud.com. _ssh._tcp.           barMac

ドメインにユーザー名と Instance Name を追加したもので ssh 接続する

hoge@iMac:~$ ssh hoge@fooMac.999999999.members.btmm.icloud.com

以下は古い

  1. iClound にコンピュータを追加

  2. mDNS -E コマンドで icloud のドメインを取得する

    myMac:~ hoge$ mDNS -E
    

Looking for recommended registration domains:
Talking to DNS SD Daemon at Mach port 5891
13:08:41.371 Recommended Registration Domain local. Added
13:08:41.371 Recommended Registration Domain 999999999.members.btmm.icloud.com. Added


1. [ssh 接続したいコンピュータ名].999999999.members.btmm.icloud.com で接続できる

	```
	ssh myMac.999999999.members.btmm.icloud.com
	```
60
57
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
60
57

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?