ssh

package
v6.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatPublicKey

func FormatPublicKey(key interface{}) ([]byte, error)

Types

type AuthDialer

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

func NewDialer

func NewDialer(keyPath, keyPassphrase string) (*AuthDialer, error)

func NewDialerWithKey

func NewDialerWithKey(key crypto.Signer) (*AuthDialer, error)

func NewDialerWithKeyWithoutPassPhrase

func NewDialerWithKeyWithoutPassPhrase(pemBytes []byte) (*AuthDialer, error)

func NewDialerWithPassword

func NewDialerWithPassword(password string) (*AuthDialer, error)

func (*AuthDialer) Dial

func (d *AuthDialer) Dial(address, username string, timeout time.Duration) (Connection, error)

type Connection

type Connection interface {
	UploadFile(path string, data []byte) (bool, error)
	DownloadFile(path string) ([]byte, error)
	RunCommand(command string, output io.Writer) (int32, error)
	Close() error
}

type Dialer

type Dialer interface {
	Dial(address, username string, timeout time.Duration) (Connection, error)
}

Jump to

Keyboard shortcuts

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