ssh

package
v0.0.0-...-9774daa Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2015 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SignInIdLength      = 4
	SignInSecretLength  = 16
	SessionIdLength     = 8
	SessionSecretLength = 40
	CsrfTokenLength     = 40
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	sync.Mutex

	// Deadline is the maximum time the listener will block
	// between connections. As a consequence, this duration
	// also sets the max length of time the SSH server will
	// be unresponsive before shutting down.
	Deadline time.Duration

	// Handlers is an array of SSHHandlers which process incoming connections
	Handlers map[string]handlers.SSHHandler

	// Logger logs errors and debug output for the SSH server
	Logger log.Logger

	// Bind specifies the Bind address the SSH server will listen on
	Bind string

	// PrivateKey is added to the SSH config as a host key
	PrivateKey ssh.Signer

	// System is the System datamodel
	System datamodel.System
	// contains filtered or unexported fields
}

Config is used to setup the SSHServer.

func (*Config) Handler

func (c *Config) Handler(channel string) (handler handlers.SSHHandler, ok bool)

func (*Config) SSHConfig

func (c *Config) SSHConfig() (*ssh.ServerConfig, error)

type SSHServer

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

func NewSSHServer

func NewSSHServer(cfg *Config) (server SSHServer, err error)

func (*SSHServer) Start

func (s *SSHServer) Start()

func (*SSHServer) Stop

func (s *SSHServer) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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