server

package
v0.5.16 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MPL-2.0 Imports: 21 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 HandlePTY

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

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) 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