ssh

package
v0.0.0-...-1f20b29 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InsecureIgnoreHostKey bool

Functions

func Escape

func Escape(args []string) string

func Escape1

func Escape1(arg string) string

func IsSigKill

func IsSigKill(err error) bool

func NewSSHSession

func NewSSHSession(user, host string) (*ssh.Session, error)

func SCPGet

func SCPGet(src, dest string, progress func(float64), session *ssh.Session) error

TODO(benesch): Make progress handling for directories less confusing. The SCP protocol makes this challenging, as it does not send the total size of all files.

func SCPPut

func SCPPut(src, dest string, progress func(float64), session *ssh.Session) error

Types

type ProgressWriter

type ProgressWriter struct {
	Writer   io.Writer
	Done     int64
	Total    int64
	Progress func(float64)
}

func (*ProgressWriter) Write

func (p *ProgressWriter) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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