Packages

Perform over-the-air updates to Nerves devices using ssh

Retired package: Deprecated - Use ssh_subsystem_fwup with nerves_ssh

Current section

Files

Jump to
nerves_firmware_ssh lib nerves_firmware_ssh no_shell.ex
Raw

lib/nerves_firmware_ssh/no_shell.ex

defmodule Nerves.Firmware.SSH.NoShell do
@moduledoc false
@doc """
Called by `:ssh.daemon` when a user requests an interactive shell.
"""
@spec start_shell(charlist(), :ssh.ip_port()) :: pid()
def start_shell(_user, _peer) do
spawn(fn ->
IO.puts("Interactive login unsupported. Use the nerves_firmware_ssh subsystem.")
end)
end
@doc """
Called by `:ssh.daemon` when a user tries to run a remote command.
"""
@spec start_exec(charlist(), charlist(), :ssh.ip_port()) :: pid()
def start_exec(_cmd, _user, _peer) do
spawn(fn ->
IO.puts("Command execution unsupported.")
end)
end
end