summaryrefslogtreecommitdiff
path: root/lib/chessh/ssh/server_key.ex
blob: 72a4fbb0acbfde267cba838d79291ec17f83ad16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
defmodule Chessh.SSH.ServerKey do
  alias Chessh.Auth.KeyAuthenticator
  @behaviour :ssh_server_key_api

  def is_auth_key(key, username, _daemon_options) do
    KeyAuthenticator.authenticate(username, key)
  end

  def host_key(algorithm, daemon_options) do
    :ssh_file.host_key(algorithm, daemon_options)
  end
end