sshserver

package
v0.0.0-...-4c5ac3e Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelHandler

type ChannelHandler interface {
	Allow(ctx context.Context, pubKey ssh.PublicKey) error
	Session(ctx context.Context, h Handle) error
}

type Handle

type Handle interface {
	io.Reader
	io.Writer
	AuthKey() string
	Size() (rows, cols uint)
}

type PtyReqPayload

type PtyReqPayload struct {
	Term        string
	Columns     uint32
	Rows        uint32
	PixelWidth  uint32
	PixelHeight uint32
	Modes       []TerminalMode
}

type SshServer

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

func NewSshServer

func NewSshServer(cfg SshServerConfig, handler ChannelHandler) *SshServer

func (*SshServer) Run

func (s *SshServer) Run(ctx context.Context) error

type SshServerConfig

type SshServerConfig struct {
	PrivateKeyPath string
	ListenAddr     string
}

type TerminalMode

type TerminalMode struct {
	OpCode   byte
	Argument uint32
}

type WindowChangePayload

type WindowChangePayload struct {
	Columns     uint32
	Rows        uint32
	PixelWidth  uint32
	PixelHeight uint32
}

Jump to

Keyboard shortcuts

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