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 }
Click to show internal directories.
Click to hide internal directories.