sshd

package module
v0.0.0-...-39bd114 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DEFAULT_SHELL string = "sh"
)

Functions

func PtyRun

func PtyRun(c *exec.Cmd, tty *os.File) (err error)

Start assigns a pseudo-terminal tty os.File to c.Stdin, c.Stdout, and c.Stderr, calls c.Start, and returns the File of the tty's corresponding pty.

func SetWinsize

func SetWinsize(fd uintptr, w, h uint32)

SetWinsize sets the size of the given pty.

Types

type Config

type Config struct {
	Host       string
	Port       string
	Shell      string
	KeyFile    string
	KeySeed    string
	AuthType   string
	IgnoreEnv  bool
	LogVerbose bool
}

type Server

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

Server is a simple SSH Daemon

func NewServer

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

NewServer creates a new Server

func (*Server) Start

func (s *Server) Start() error

Start listening on port

type Winsize

type Winsize struct {
	Height uint16
	Width  uint16
	// contains filtered or unexported fields
}

Winsize stores the Height and Width of a terminal.

Jump to

Keyboard shortcuts

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