diff options
Diffstat (limited to 'lib/chessh/ssh/server_key.ex')
-rw-r--r-- | lib/chessh/ssh/server_key.ex | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/chessh/ssh/server_key.ex b/lib/chessh/ssh/server_key.ex new file mode 100644 index 0000000..72a4fbb --- /dev/null +++ b/lib/chessh/ssh/server_key.ex @@ -0,0 +1,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 |