5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-15 06:30:25 +00:00
matterbridge/vendor/github.com/shazow/ssh-chat/sshd/doc.go

35 lines
520 B
Go
Raw Normal View History

2017-12-03 00:24:05 +00:00
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(...)
}
}()
}
*/