server

package
v0.0.0-...-9758eb9 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecCmd

func ExecCmd(ctx context.Context, channel gossh.Channel, command string, ptyTerm string, isPty bool, winCh <-chan ssh.Window, cmd exec.Cmd, uid, gid uint64, username string) int

func GetShell

func GetShell(user *user.User) (string, error)

func NewServer

func NewServer(logger *zap.Logger, ca string, opts ...Option) (*ssh.Server, error)

NewServer returns a new ssh server.

func StartChildProcess

func StartChildProcess(ctx context.Context, s io.ReadWriteCloser, process, username string) error

Types

type Option

type Option func(*options)

Option represents a configuration option for the ssh server.

func WithUsername

func WithUsername(username string) Option

WithUsername is the option to override the ssh username.

Jump to

Keyboard shortcuts

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