sshutil

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSSHClient

func NewSSHClient(d drivers.Driver) (*ssh.Client, error)

NewSSHClient returns an SSH client object for running commands.

func RunCommand

func RunCommand(c *ssh.Client, cmd string) error

func Transfer

func Transfer(reader io.Reader, readerLen int64, remotedir, filename string, perm string, c *ssh.Client) error

Transfer uses an SSH session to copy a file to the remote machine.

Types

type SSHSession

type SSHSession interface {
	Close() error
	StdinPipe() (io.WriteCloser, error)
	Run(cmd string) error
	Wait() error
}

SSHSession provides methods for running commands on a host.

Jump to

Keyboard shortcuts

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