ssh

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: MIT Imports: 22 Imported by: 0

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

func ParseScpPath added in v0.5.0

func ParseScpPath(arg string) (hostType string, path string, result bool)

@brief:

parse lscp args path

Types

type Connect added in v0.5.0

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

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) RunCmdGetOutput added in v0.5.0

func (c *Connect) RunCmdGetOutput(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 {
	Type   string
	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