ssh

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const NO_TIMEOUT = 0

Variables

This section is empty.

Functions

func MakeKeyring

func MakeKeyring(key_filenames []string) ssh.AuthMethod

func Shellescape

func Shellescape(str string) string

Types

type Keychain

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

func (*Keychain) Key

func (k *Keychain) Key(i int) (key ssh.PublicKey, err error)

func (*Keychain) Sign

func (k *Keychain) Sign(i int, rand io.Reader, data []byte) (signature *ssh.Signature, err error)

type SshConnection

type SshConnection struct {
	SudoCommand string
	// contains filtered or unexported fields
}

func (*SshConnection) Close

func (conn *SshConnection) Close()

func (*SshConnection) NewSession

func (conn *SshConnection) NewSession() (*ssh.Session, error)

func (*SshConnection) Open

func (conn *SshConnection) Open(server string, auths ssh.AuthMethod, timeout int) error

func (*SshConnection) Run

func (conn *SshConnection) Run(command string, timeout int, sudo bool) (*string, *string, error)

func (*SshConnection) RunWithWriters

func (conn *SshConnection) RunWithWriters(command string, timeout int, sudo bool, stdout io.Writer, stderr io.Writer) error

Jump to

Keyboard shortcuts

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