Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectFunc ¶ added in v0.2.0
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.
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) // NoPty, if true, will not request a pty from the remote end. NoPty bool }
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.
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.
type SimpleKeychain ¶
type SimpleKeychain struct {
// contains filtered or unexported fields
}
SimpleKeychain makes it easy to use private keys in order to connect via SSH, since the interface exposed by Go isn't the easiest to use right away.
func (*SimpleKeychain) AddPEMKey ¶
func (k *SimpleKeychain) AddPEMKey(key string) (err error)
AddPEMKey adds a simple PEM encoded private key to the keychain.
func (*SimpleKeychain) AddPEMKeyPassword ¶ added in v0.3.0
func (k *SimpleKeychain) AddPEMKeyPassword(key string, password string) (err error)
AddPEMKeyPassword adds a PEM encoded private key that is protected by a password to the keychain.
func (*SimpleKeychain) Key ¶
func (k *SimpleKeychain) Key(i int) (interface{}, error)
Key method for ssh.ClientKeyring interface