ssh

package
v0.0.0-...-fb842f2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeclineUnknownRequest

func DeclineUnknownRequest(L *zap.Logger, req *ssh.Request)

func GenerateHostKey

func GenerateHostKey(path string) error

func LoadHostKey

func LoadHostKey(path string) (ssh.Signer, error)

func LoadOrGenerateHostKey

func LoadOrGenerateHostKey(path string) (ssh.Signer, error)

func Server

func Server(cfg *config.Config, subs ...Subsystem) server.Server

Types

type SSHConn

type SSHConn struct {
	*SSHConnShared
	Conn *ssh.ServerConn
	L    *zap.Logger
}

type SSHConnShared

type SSHConnShared struct {
	Server *SSHServer
	Fs     afero.Fs

	ServerConfig *ssh.ServerConfig
}

type SSHServer

type SSHServer struct {
	L *zap.Logger
	// contains filtered or unexported fields
}

func (*SSHServer) Run

func (s *SSHServer) Run(ctx context.Context, fs afero.Fs) error

type Subsystem

type Subsystem interface {
	ID() string
	Serve(conn *SSHConn, ch ssh.Channel)
}

func SFTP

func SFTP(cfg *config.Config) Subsystem

Jump to

Keyboard shortcuts

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