internal

package
v0.0.0-...-95b795d Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServers

func RunServers(addr string, server *ssh.Server, mux http.Handler) error

RunServers starts listening for connections, and handles interrupts/signals. When it returns the servers are dead.

func ServerOpts

func ServerOpts(ctx context.Context, cfg *config.AppConfig, extraOpts ...ssh.Option) []ssh.Option

ServerOpts makes sensible default ssh Options based on our config

Types

type Health

type Health struct {
	Version string
}

Health is the basis of a simple health-check service

func (Health) ServeHTTP

func (h Health) ServeHTTP(w http.ResponseWriter, _ *http.Request)

type PublicKeyAuth

type PublicKeyAuth struct {
	// contains filtered or unexported fields
}

PublicKeyAuth checks an incoming connection against a list of allowed keys It provides a `PublicKeyHandler` method which is compatible with `ssh.PublicKeyHandler`

func NewPublicKeyAuthFromFiles

func NewPublicKeyAuthFromFiles(ctx context.Context, paths []string) PublicKeyAuth

NewPublicKeyAuthFromFiles loads public keys from a list of paths

func (PublicKeyAuth) PublicKeyHandler

func (p PublicKeyAuth) PublicKeyHandler(x ssh.Context, key ssh.PublicKey) bool

PublicKeyHandler decides if we allow access based on comparing public keys

Directories

Path Synopsis
tui

Jump to

Keyboard shortcuts

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