server

package
v0.0.0-...-623c833 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCommandProviderRequired = errors.New("command provider is required")
)

Functions

func CreateServer

func CreateServer(opts CreateServerOptions) (*ssh.Server, error)

Types

type CreateServerOptions

type CreateServerOptions struct {

	// Always use `exec.CommandContext` to create the command.
	CommandProvider func(s ssh.Session) *exec.Cmd

	// Optional
	Host        string
	Port        string
	HostKeyPath string

	PublicKeyAuth func(ctx ssh.Context, key ssh.PublicKey) bool
	PasswordAuth  func(ctx ssh.Context, password string) bool
}

Jump to

Keyboard shortcuts

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