NervesSSH.Options (nerves_ssh v0.2.3) View Source

Defines option for running the SSH daemon.

The following fields are available:

  • :authorized_keys - a list of SSH authorized key file string
  • :port - the TCP port to use for the SSH daemon. Defaults to 22.
  • :subsystems - a list of SSH subsystems specs to start. Defaults to SFTP and ssh_subsystem_fwup
  • :system_dir - where to find host keys
  • :shell - the language of the shell (:elixir, :erlang, :lfe or :disabled). Defaults to :elixir.
  • :exec - the language to use for commands sent over ssh (:elixir, :erlang, or :disabled). Defaults to :elixir.
  • :iex_opts - additional options to use when starting up IEx
  • :user_passwords - a list of username/password tuples (stored in the clear!)
  • :daemon_option_overrides - additional options to pass to :ssh.daemon/2. These take precedence and are unchecked.

Link to this section Summary

Functions

Return :ssh.daemon_options()

Convert keyword options to the NervesSSH.Options

Go through the options and fix anything that might crash

Create a new NervesSSH.Options and fill in defaults

Link to this section Types

Specs

language() :: :elixir | :erlang | :lfe | :disabled

Specs

t() :: %NervesSSH.Options{
  authorized_keys: [String.t()],
  daemon_option_overrides: keyword(),
  exec: language(),
  iex_opts: keyword(),
  port: non_neg_integer(),
  shell: language(),
  subsystems: [:ssh.subsystem_spec()],
  system_dir: Path.t(),
  user_passwords: [{String.t(), String.t()}]
}

Link to this section Functions

Specs

daemon_options(t()) :: :ssh.daemon_options()

Return :ssh.daemon_options()

Specs

new(keyword()) :: t()

Convert keyword options to the NervesSSH.Options

Specs

sanitize(t()) :: t()

Go through the options and fix anything that might crash

The goal is to make options "always work" since it is painful to debug typo's, etc. that cause the ssh daemon to not start.

Link to this function

with_defaults(opts \\ [])

View Source

Specs

with_defaults(keyword()) :: t()

Create a new NervesSSH.Options and fill in defaults