types

package
v0.0.0-db80831 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAuthorizedKeysPath

func DefaultAuthorizedKeysPath() string

func ParseAuthorizedKeysContent

func ParseAuthorizedKeysContent(content string) []string

ParseAuthorizedKeysContent parses the newline-separated authorized keys content

func ParseAuthorizedKeysFiles

func ParseAuthorizedKeysFiles(paths string) []string

ParseAuthorizedKeysFiles parses the colon-separated authorized keys file paths

Types

type Config

type Config struct {
	ListenAddr           string
	HostKeyPath          string // Path to host key file (command line arg)
	HostKeyContent       string // Host key content (from env SSHDEV_HOST_KEY)
	HostKeyBuiltin       bool   // Use built-in host key (from env SSHDEV_HOST_KEY_BUILTIN)
	Password             string // Password for authentication (from env SSHDEV_PASSWORD)
	AuthorizedKeysFiles  string // Authorized keys file paths, colon-separated (from env SSHDEV_AUTHORIZED_KEYS_FILES)
	AuthorizedKeys       string // Authorized keys content, newline-separated (from env SSHDEV_AUTHORIZED_KEYS)
	Shell                string // Shell to use (from env SSHDEV_SHELL, empty = current user's default)
	DisablePortForward   bool   // Disable local port forwarding (direct-tcpip), default: enabled
	DisableRemoteForward bool   // Disable remote port forwarding (tcpip-forward), default: enabled
}

Config holds the server configuration

func (*Config) HasPasswordAuth

func (c *Config) HasPasswordAuth() bool

HasPasswordAuth returns true if password authentication is enabled

func (*Config) HasPublicKeyAuth

func (c *Config) HasPublicKeyAuth() bool

HasPublicKeyAuth returns true if public key authentication is enabled

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration

Jump to

Keyboard shortcuts

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