ssh

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2015 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SCP_PUSH_BEGIN_FILE = "C"
	SCP_PUSH_END        = "\x00"
)

Variables

This section is empty.

Functions

func AgentAuthMethod

func AgentAuthMethod() (ssh.AuthMethod, error)

func KeyBytesAuthMethod

func KeyBytesAuthMethod(buff []byte) (ssh.AuthMethod, error)

func KeyFileAuthMethod

func KeyFileAuthMethod(privateKeyfile string) (ssh.AuthMethod, error)

func ParseKey

func ParseKey(file string) (ssh.Signer, error)

Types

type Client

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

func NewClient

func NewClient(user, host string, auth ssh.AuthMethod) (*Client, error)

func (*Client) Copy

func (this *Client) Copy(data io.Reader, perm os.FileMode, size int64, destFile string) error

func (*Client) CopyBytes

func (this *Client) CopyBytes(data []byte, perm os.FileMode, destFile string) error

func (*Client) CopyFile

func (this *Client) CopyFile(srcFile, destFile string) error

func (*Client) RunCommandStdout

func (this *Client) RunCommandStdout(cmd string) ([]byte, error)

type PublicKey

type PublicKey struct {
	Algo  string
	Bytes []byte
	User  string
	Host  string
}

func ParsePublicKey

func ParsePublicKey(keyBytes []byte) (*PublicKey, error)

func ParsePublicKeyFile

func ParsePublicKeyFile(keyfile string) (*PublicKey, error)

Jump to

Keyboard shortcuts

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