ssh

package
v3.8.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: MIT Imports: 9 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)
	RunCommand(command string, output io.Writer) (uint8, 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