ssh

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2018 License: MIT Imports: 21 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProxyList added in v0.5.0

func GetProxyList(server string, config conf.Config) (proxyList []string, proxyType map[string]string, err error)

@brief:

get ssh proxy server slice

Types

type Connect added in v0.5.0

type Connect struct {
	Server           string
	Conf             conf.Config
	IsTerm           bool
	IsParallel       bool
	IsLocalRc        bool
	LocalRcData      string
	LocalRcDecodeCmd string
}

func (*Connect) ConTerm added in v0.5.0

func (c *Connect) ConTerm(session *ssh.Session) (err error)

@brief:

connect ssh terminal

func (*Connect) CreateSession added in v0.5.0

func (c *Connect) CreateSession() (session *ssh.Session, err error)

@brief: create ssh session

func (*Connect) RunCmd added in v0.5.0

func (c *Connect) RunCmd(session *ssh.Session, command []string) (err error)

@brief:

run command over ssh

func (*Connect) RunCmdWithOutput added in v0.5.1

func (c *Connect) RunCmdWithOutput(session *ssh.Session, command []string, outputChan chan string)

@brief:

Run command over ssh, output to gochannel

type CopyConInfo added in v0.5.0

type CopyConInfo struct {
	IsRemote bool
	Path     []string
	Server   []string
}

type Proxy added in v0.5.0

type Proxy struct {
	Name string
	Type string
}

type Run added in v0.5.0

type Run struct {
	ServerList []string
	Conf       conf.Config
	IsTerm     bool
	IsParallel bool
	ExecCmd    []string
	StdinData  []byte
	OutputData *bytes.Buffer
}

func (*Run) Start added in v0.5.0

func (r *Run) Start()

type RunScp added in v0.5.0

type RunScp struct {
	From       CopyConInfo
	To         CopyConInfo
	CopyData   *bytes.Buffer
	Permission bool
	Config     conf.Config
}

func (*RunScp) Start added in v0.5.0

func (r *RunScp) Start()

@brief:

start

Jump to

Keyboard shortcuts

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