server

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: MPL-2.0 Imports: 19 Imported by: 1

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