summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/shazow/ssh-chat/sshd/doc.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/shazow/ssh-chat/sshd/doc.go')
-rw-r--r--vendor/github.com/shazow/ssh-chat/sshd/doc.go34
1 files changed, 34 insertions, 0 deletions
diff --git a/vendor/github.com/shazow/ssh-chat/sshd/doc.go b/vendor/github.com/shazow/ssh-chat/sshd/doc.go
new file mode 100644
index 00000000..21cd9142
--- /dev/null
+++ b/vendor/github.com/shazow/ssh-chat/sshd/doc.go
@@ -0,0 +1,34 @@
+package sshd
+
+/*
+
+ signer, err := ssh.ParsePrivateKey(privateKey)
+
+ config := MakeNoAuth()
+ config.AddHostKey(signer)
+
+ s, err := ListenSSH("0.0.0.0:2022", config)
+ if err != nil {
+ // Handle opening socket error
+ }
+ defer s.Close()
+
+ terminals := s.ServeTerminal()
+
+ for term := range terminals {
+ go func() {
+ defer term.Close()
+ term.SetPrompt("...")
+ term.AutoCompleteCallback = nil // ...
+
+ for {
+ line, err := term.ReadLine()
+ if err != nil {
+ break
+ }
+ term.Write(...)
+ }
+
+ }()
+ }
+*/