func Handle(handler Handler) {
	DefaultHandler = handler
}
Handle registers the handler as the DefaultHandler.
package ssh
import (
	"crypto/subtle"
	"net"
	gossh "golang.org/x/crypto/ssh"
)
type Signal string
const (
	SIGABRT Signal = "ABRT"
	SIGALRM Signal = "ALRM"
	SIGFPE  Signal = "FPE"
	SIGHUP  Signal = "HUP"
	SIGILL  Signal = "ILL"
	SIGINT  Signal = "INT"
	SIGKILL Signal = "KILL"
	SIGPIPE Signal = "PIPE"
	SIGQUIT Signal = "QUIT"
	SIGSEGV Signal = "SEGV"
	SIGTERM Signal = "TERM"
	SIGUSR1 Signal = "USR1"
	SIGUSR2 Signal = "USR2"
)
var DefaultHandler Handler
type Option func(*Server) error
type Handler func(Session)
type PublicKeyHandler func(ctx Context, key PublicKey) bool
type PasswordHandler func(ctx Context, password string) bool
type KeyboardInteractiveHandler func(ctx Context, challenger gossh.KeyboardInteractiveChallenge) bool
type PtyCallback func(ctx Context, pty Pty) bool
type SessionRequestCallback func(sess Session, requestType string) bool
type ConnCallback func(ctx Context, conn net.Conn) net.Conn
type LocalPortForwardingCallback func(ctx Context, destinationHost string, destinationPort uint32) bool
type ReversePortForwardingCallback func(ctx Context, bindHost string, bindPort uint32) bool
type ServerConfigCallback func(ctx Context) *gossh.ServerConfig
type Window struct {
	Width  int
	Height int
}
type Pty struct {
	Term   string
	Window Window
}
func Serve(l net.Listener, handler Handler, options ...Option) error {
	srv := &Server{Handler: handler}
	for _, option := range options {
		if err := srv.SetOption(option); err != nil {
			return err
		}
	}
	return srv.Serve(l)
}
func ListenAndServe(addr string, handler Handler, options ...Option) error {
	srv := &Server{Addr: addr, Handler: handler}
	for _, option := range options {
		if err := srv.SetOption(option); err != nil {
			return err
		}
	}
	return srv.ListenAndServe()
}