Documentation
¶
Index ¶
- type SshSession
- func (thisSession *SshSession) Close()
- func (thisSession *SshSession) DownloadFile(remoteFilePath string, localFilePath string)
- func (thisSession *SshSession) ExecuteCommand(command string, startLine string) (string, error)
- func (thisSession *SshSession) ExecuteMoreCommand(command string, moreCommand string, prompt string, clearLine string, ...) (string, error)
- func (thisSession *SshSession) UploadFile(localFilePath string, remoteFilePath string)
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)
Click to show internal directories.
Click to hide internal directories.