Skip to content

Instantly share code, notes, and snippets.

@mamemomonga
Created January 22, 2015 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamemomonga/1839e1cadd6dc36f45e0 to your computer and use it in GitHub Desktop.
Save mamemomonga/1839e1cadd6dc36f45e0 to your computer and use it in GitHub Desktop.
LinuxでmDNSのSSHをアナウンスする設定

dns-sd の設定

参考: Raspberry Pi(Raspbian)にmDNSを設定する

# vim /etc/hostname
raspberrypi1

# aptitude install avahi-daemon libnss-mdns
# cat > /etc/avahi/services/ssh.service << 'EOS'
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">

<service-group>
  <name replace-wildcards="yes">%h</name>

  <service>
    <type>_ssh._tcp</type>
    <port>22</port>
  </service>
</service-group>
EOS

# reboot

OSXからこれで繋がるはず

Macから

$ ssh root@raspberrypi1.local

一覧表示
$ dns-sd -B _ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment