add simple Hello "world"

This commit is contained in:
hloeffler 2016-12-19 20:27:36 +01:00
parent 8fc7fced07
commit 1f17e45e60

19
_example/simple/simple.go Normal file

@ -0,0 +1,19 @@
package main
import (
"io"
"log"
"github.com/hloeffler/ssh"
)
func main() {
ssh.Handle(func(s ssh.Session) {
user := s.User()
io.WriteString(s, "Hello "+user+"\n")
})
log.Fatal(ssh.ListenAndServe(":2222", nil))
}