Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidConfig is returned when the configuration is invalid ErrInvalidConfig = errors.New("invalid configuration") // ErrAuthenticationFailed is returned when authentication fails ErrAuthenticationFailed = errors.New("authentication failed") )
Functions ¶
func DefaultAuthorizedKeysPath ¶
func DefaultAuthorizedKeysPath() string
DefaultAuthorizedKeysPath returns the default path to authorized_keys
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 ¶
HasPasswordAuth returns true if password authentication is enabled
func (*Config) HasPublicKeyAuth ¶
HasPublicKeyAuth returns true if public key authentication is enabled
Click to show internal directories.
Click to hide internal directories.