Versions in this module Expand all Collapse all v0 v0.1.0 Feb 4, 2017 Changes in this version + func Handle(handler Handler) + func KeysEqual(ak, bk PublicKey) bool + func ListenAndServe(addr string, handler Handler, options ...Option) error + func Serve(l net.Listener, handler Handler, options ...Option) error + type Handler func(Session) + var DefaultHandler Handler + type Option func(*Server) error + func HostKeyFile(filepath string) Option + func HostKeyPEM(bytes []byte) Option + func NoPty() Option + func PasswordAuth(fn PasswordHandler) Option + func PublicKeyAuth(fn PublicKeyHandler) Option + type PasswordHandler func(user, password string) bool + type Permissions struct + type PermissionsCallback func(user string, permissions *Permissions) error + type Pty struct + Window Window + type PtyCallback func(user string, permissions *Permissions) bool + type PublicKey interface + func ParseAuthorizedKey(in []byte) (out PublicKey, comment string, options []string, rest []byte, err error) + func ParsePublicKey(in []byte) (out PublicKey, err error) + type PublicKeyHandler func(user string, key PublicKey) bool + type Server struct + Addr string + Handler Handler + HostSigners []Signer + PasswordHandler PasswordHandler + PermissionsCallback PermissionsCallback + PtyCallback PtyCallback + PublicKeyHandler PublicKeyHandler + Version string + func (srv *Server) AddHostKey(key Signer) + func (srv *Server) Handle(fn Handler) + func (srv *Server) ListenAndServe() error + func (srv *Server) Serve(l net.Listener) error + func (srv *Server) SetOption(option Option) error + type Session interface + Command func() []string + Environ func() []string + Exit func(code int) error + Pty func() (Pty, <-chan Window, bool) + PublicKey func() PublicKey + RemoteAddr func() net.Addr + User func() string + type Signal string + const SIGABRT + const SIGALRM + const SIGFPE + const SIGHUP + const SIGILL + const SIGINT + const SIGKILL + const SIGPIPE + const SIGQUIT + const SIGSEGV + const SIGTERM + const SIGUSR1 + const SIGUSR2 + type Signer interface + type Window struct + Height int + Width int