ssh

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2013 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectFunc added in v0.2.0

func ConnectFunc(network, addr string, timeout time.Duration) func() (net.Conn, error)

ConnectFunc is a convenience method for returning a function that just uses net.Dial to communicate with the remote end that is suitable for use with the SSH communicator configuration.

func New

func New(config *Config) (result *comm, err error)

Creates a new packer.Communicator implementation over SSH. This takes an already existing TCP connection and SSH configuration.

Types

type Config added in v0.2.0

type Config struct {
	// The configuration of the Go SSH connection
	SSHConfig *ssh.ClientConfig

	// Connection returns a new connection. The current connection
	// in use will be closed as part of the Close method, or in the
	// case an error occurs.
	Connection func() (net.Conn, error)
}

Config is the structure used to configure the SSH communicator.

type Password

type Password string

An implementation of ssh.ClientPassword so that you can use a static string password for the password to ClientAuthPassword.

func (Password) Password

func (p Password) Password(user string) (string, error)

type PasswordKeyboardInteractive added in v0.1.4

type PasswordKeyboardInteractive string

An implementation of ssh.ClientKeyboardInteractive that simply sends back the password for all questions. The questions are logged.

func (PasswordKeyboardInteractive) Challenge added in v0.1.4

func (p PasswordKeyboardInteractive) Challenge(user, instruction string, questions []string, echos []bool) ([]string, error)

type SimpleKeychain

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

func (*SimpleKeychain) AddPEMKey

func (k *SimpleKeychain) AddPEMKey(key string) (err error)

AddPEMKey adds a simple PEM encoded private key to the keychain.

func (*SimpleKeychain) Key

func (k *SimpleKeychain) Key(i int) (interface{}, error)

Key method for ssh.ClientKeyring interface

func (*SimpleKeychain) Sign

func (k *SimpleKeychain) Sign(i int, rand io.Reader, data []byte) (sig []byte, err error)

Sign method for ssh.ClientKeyring interface

Jump to

Keyboard shortcuts

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