summaryrefslogtreecommitdiff
path: root/lib/chessh/shell.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chessh/shell.ex')
-rw-r--r--lib/chessh/shell.ex18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/chessh/shell.ex b/lib/chessh/shell.ex
new file mode 100644
index 0000000..f9f475d
--- /dev/null
+++ b/lib/chessh/shell.ex
@@ -0,0 +1,18 @@
+defmodule Chessh.Shell do
+ use Sshd.ShellHandler
+
+ def on_shell(_username, _public_key, _ip, _port) do
+ :ok =
+ IO.puts(
+ "Interactive example SSH shell - type exit ENTER to quit and it is running on #{inspect(self())}"
+ )
+ end
+
+ def on_connect(_username, _ip, _port, _method) do
+ Logger.debug("Connection established")
+ end
+
+ def on_disconnect(_username, _ip, _port) do
+ Logger.debug("Connection disestablished")
+ end
+end