mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-05 20:44:04 +00:00
Add sshchat dependencies in vendor
This commit is contained in:
34
vendor/github.com/shazow/ssh-chat/sshd/doc.go
generated
vendored
Normal file
34
vendor/github.com/shazow/ssh-chat/sshd/doc.go
generated
vendored
Normal file
@ -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(...)
|
||||
}
|
||||
|
||||
}()
|
||||
}
|
||||
*/
|
Reference in New Issue
Block a user