sshutil

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSH

type SSH struct {
	User     string
	Password string
	PkFile   string
}

func (*SSH) Cmd

func (ss *SSH) Cmd(host string, cmd string) []byte

Cmd is

func (*SSH) CmdToString

func (ss *SSH) CmdToString(host, cmd string) string

func (*SSH) Connect

func (ss *SSH) Connect(host string) (*ssh.Session, error)

* 这里主要是做连接ssh操作的

func (*SSH) Copy

func (ss *SSH) Copy(host, localFilePath, remoteFilePath string)

Copy is

func (*SSH) CopyForMD5 added in v1.4.1

func (ss *SSH) CopyForMD5(host, localFilePath, remoteFilePath, md5 string) bool

Copy is

func (*SSH) IsFilExist

func (ss *SSH) IsFilExist(host, remoteFilePath string) bool

RemoteFilExist is

func (*SSH) LoggerFileSize

func (ss *SSH) LoggerFileSize(host, filename string, size int)

WatchFileSize is

func (*SSH) Md5Sum added in v1.4.1

func (ss *SSH) Md5Sum(host, remoteFilePath string) string

Jump to

Keyboard shortcuts

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