ssh-chat/sshd/doc.go
Matt Croydon 492d50d521 Default port to 2022, updating documentation to match new default. Addresses nice to have in #76.
Also print bind information on startup. An alternative to this approach would be to use info level logging, but the issue makes me think we want it all the time. I altered the README to show use of non-default port 22 which makes the note about root/sudo below still make sense.
2015-01-04 22:00:09 -06:00

35 lines
520 B
Go

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(...)
}
}()
}
*/