aboutsummaryrefslogtreecommitdiff
path: root/lib/chessh/ssh/server_key.ex
diff options
context:
space:
mode:
authorSimponic <loganhunt@simponic.xyz>2022-12-27 23:50:22 -0700
committerSimponic <loganhunt@simponic.xyz>2022-12-27 23:50:22 -0700
commit10bc34245e8e1e3ba63fb0720d3bcfb1119db921 (patch)
tree0158f37dcda36f36327e45c4ce7543e77c26c8a0 /lib/chessh/ssh/server_key.ex
parentf7c2ccbe26dc808e4a7eae9a378e6c382220961a (diff)
downloadchessh-10bc34245e8e1e3ba63fb0720d3bcfb1119db921.tar.gz
chessh-10bc34245e8e1e3ba63fb0720d3bcfb1119db921.zip
Initial erlang stuff
Diffstat (limited to 'lib/chessh/ssh/server_key.ex')
-rw-r--r--lib/chessh/ssh/server_key.ex11
1 files changed, 11 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..1096e09
--- /dev/null
+++ b/lib/chessh/ssh/server_key.ex
@@ -0,0 +1,11 @@
+defmodule Chessh.SSH.ServerKey do
+ @behaviour :ssh_server_key_api
+
+ def is_auth_key(key, username, _daemon_options) do
+ Chessh.Auth.KeyAuthenticator.authenticate(username, key)
+ end
+
+ def host_key(algorithm, daemon_options) do
+ :ssh_file.host_key(algorithm, daemon_options)
+ end
+end