sshd

package
v0.0.0-...-538f495 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2014 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrivateKey

func PrivateKey(pemData []byte) func(*Server) error

PrivateKey sets the server's private key and host key.

Types

type Server

type Server struct {
	Bind string
	Uid  string

	SSH ssh.ServerConfig
	// contains filtered or unexported fields
}

Server is an SSH server.

func NewServer

func NewServer(bind, uid string, opt ...func(*Server) error) *Server

NewServer creates a new test SSH server that runs a shell command upon login (with the current directory set to user). It can be used to test remote SSH communication.

func (*Server) Drain

func (s *Server) Drain()

Drain causes the caller to block until all active SSH connections have finished

func (*Server) Start

func (s *Server) Start()

Start starts the server in a goroutine.

func (*Server) Stop

func (s *Server) Stop() error

Jump to

Keyboard shortcuts

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