sshclient

package
v1.6.16-beta-2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHSession added in v1.8.2

type SSHSession struct {
	// contains filtered or unexported fields
}

func NewSSHSession

func NewSSHSession(hostNameAndPort string, userName string, password string, timeout int) *SSHSession

func (*SSHSession) CloseSession added in v1.8.2

func (thisSession *SSHSession) CloseSession()

func (*SSHSession) DownloadFile added in v1.8.2

func (thisSession *SSHSession) DownloadFile(remoteFilePath string, localFilePath string)

func (*SSHSession) ExecuteShellCommand added in v1.8.2

func (thisSession *SSHSession) ExecuteShellCommand(command string, moreCommand string,
	prompt string, clearLine string) (string, error)

ExecuteCommand 执行命令,当需要 huawei' clear line command is "\x1B[42D"

func (*SSHSession) ExecuteSingleCommand added in v1.8.2

func (thisSession *SSHSession) ExecuteSingleCommand(command string) (string, error)

func (*SSHSession) GetShellCommandResult added in v1.8.2

func (thisSesion *SSHSession) GetShellCommandResult(prompt string,
	moreCommand string, clearLine string) string

func (*SSHSession) SendShellCommand added in v1.8.2

func (thisSesion *SSHSession) SendShellCommand(command string) error

func (*SSHSession) UploadFile added in v1.8.2

func (thisSession *SSHSession) UploadFile(localFilePath string, remoteFilePath string)

Jump to

Keyboard shortcuts

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