Authorize SSH key at runtime
key = "<public key>"
Application.put_env(:nerves_ssh, :authorized_keys, [key], persistent: true)
Application.stop(:nerves_ssh); Application.ensure_all_started(:nerves_ssh)Background
$ ssh 192.168.1.2
SSH server
Enter password for "nerves"
password: Authorize SSH keys at compile time
config :nerves_ssh, authorized_keys: [...]Last updated