LoginSignup
5
1

Elixir Nervesでssh my-nerves-app-name.local

Last updated at Posted at 2021-10-02

Nervesの初期設定では、hostnameが"nerves"になっており、そのためNervesデバイスのIExにアクセスするときにはssh nerves.localをよく使うと思います

それを自分のアプリ名に変更する言う話です

config/target.exs
  config :mdns_lite,
    # The `host` key specifies what hostnames mdns_lite advertises.  `:hostname`
    # advertises the device's hostname.local. For the official Nerves systems, this
    # is "nerves-<4 digit serial#>.local".  mdns_lite also advertises
    # "nerves.local" for convenience. If more than one Nerves device is on the
    # network, delete "nerves" from the list.

-   host: [:hostname, "nerves"],
+   host: [:hostname, "my-nerves-app-name"],
    ttl: 120,

これでssh my-nerves-app-name.localでIExにアクセスできるようになりました

ネットワーク上にそのアプリが一つだけ存在している場合に、直感的にアクセスできるので気にいってます

そういえばどこかで見たことがあるな〜と思っていたら、やっぱりストック記事の中にありました

5
1
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
5
1