server

package
v0.6.2-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MPL-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPort = 8022

Functions

func ExitCode

func ExitCode(err error) int

func SftpHandler

func SftpHandler(sess ssh.Session, currentUser string, log log.Logger)

Types

type Server

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

func NewServer

func NewServer(addr string, hostKey []byte, keys []ssh.PublicKey, workdir string, log log.Logger) (*Server, error)

func (*Server) HandleNonPTY

func (s *Server) HandleNonPTY(sess ssh.Session, cmd *exec.Cmd) (err error)

func (*Server) HandlePTY

func (s *Server) HandlePTY(
	sess ssh.Session,
	ptyReq ssh.Pty,
	winCh <-chan ssh.Window,
	cmd *exec.Cmd,
	decorateReader func(reader io.Reader) io.Reader,
) (err error)

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

func (*Server) Serve

func (s *Server) Serve(listener net.Listener) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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