diff options
author | Wim <wim@42.be> | 2017-12-03 01:24:05 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-12-03 01:24:05 +0100 |
commit | ed9118b34620f1ecd5f28506328d4ffe1b04793d (patch) | |
tree | 442998012f6779446a463e402fa7c0836edcac91 /vendor/github.com/shazow/ssh-chat/sshd/doc.go | |
parent | 59e55cfbd5cc3c82236c5e8b95e5baff256f7143 (diff) | |
download | matterbridge-msglm-ed9118b34620f1ecd5f28506328d4ffe1b04793d.tar.gz matterbridge-msglm-ed9118b34620f1ecd5f28506328d4ffe1b04793d.tar.bz2 matterbridge-msglm-ed9118b34620f1ecd5f28506328d4ffe1b04793d.zip |
Add sshchat dependencies in vendor
Diffstat (limited to 'vendor/github.com/shazow/ssh-chat/sshd/doc.go')
-rw-r--r-- | vendor/github.com/shazow/ssh-chat/sshd/doc.go | 34 |
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(...) + } + + }() + } +*/ |