sshclient

package
v1.6.16-test Latest Latest
Warning

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

Go to latest
Published: May 31, 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

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

func NewSshSession

func NewSshSession(hostNameAndPort string, userName string, password string, timeout int) *SshSession

func (*SshSession) Close

func (thisSession *SshSession) Close()

func (*SshSession) DownloadFile

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

func (*SshSession) ExecuteCommand

func (thisSession *SshSession) ExecuteCommand(command string, startLine string) (string, error)

func (*SshSession) ExecuteMoreCommand

func (thisSession *SshSession) ExecuteMoreCommand(command string, moreCommand string,
	prompt string, clearLine string, startLine string, endLine string, ignoreEcho bool) (string, error)

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

func (*SshSession) UploadFile

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