ssh

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	Host     string //ip
	Port     int64  // 端口
	Username string //用户名
	Password string //密码

	LastResult string //最近一次运行的结果
	// contains filtered or unexported fields
}

连接的配置

func (*ClientConfig) CreateClient

func (cliConf *ClientConfig) CreateClient(host string, port int64, username, password string) error

func (*ClientConfig) Run

func (cliConf *ClientConfig) Run(shell string) (string, string, int, error)

func (*ClientConfig) SftpClientClose

func (cliConf *ClientConfig) SftpClientClose() error

func (*ClientConfig) SshClientClose

func (cliConf *ClientConfig) SshClientClose() error

func (*ClientConfig) UploadByte

func (cliConf *ClientConfig) UploadByte(localFileByte []byte, fileName string, remotePath string) (int, error)

func (*ClientConfig) UploadFile

func (cliConf *ClientConfig) UploadFile(localFilePath string, remotePath string) (int, error)

Jump to

Keyboard shortcuts

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