sshd

package
v0.0.0-...-37e2758 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExtensionPubFp = "pub-fp"
	ExtensionRole  = "role"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	config.SSH
	CheckUserKey func(user string, pubKey ssh.PublicKey) (string, error)
}

type HandlerFn

type HandlerFn func(conn *ssh.ServerConn, req interface{}) (interface{}, error)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(cfg *Config) (*Server, error)

func (*Server) AddHandler

func (s *Server) AddHandler(name string, fn HandlerFn)

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL