secureshell

package
v0.0.0-...-99b7af3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHExecutor

type SSHExecutor struct {
	IP             string
	Port           int
	User           string
	PrivateKeyPath string
	// contains filtered or unexported fields
}

func NewSSHExecutor

func NewSSHExecutor() *SSHExecutor

func (*SSHExecutor) Close

func (s *SSHExecutor) Close() error

func (*SSHExecutor) Connect

func (s *SSHExecutor) Connect() error

Connect now uses the SSHConnectionPool to get the connection

func (*SSHExecutor) DownloadFile

func (s *SSHExecutor) DownloadFile(remoteFilePath, localFilePath string) error

func (*SSHExecutor) GetConfig

func (s *SSHExecutor) GetConfig() (*ssh.ClientConfig, error)

func (*SSHExecutor) RunCommand

func (s *SSHExecutor) RunCommand(cmd string) (string, string, error)

func (*SSHExecutor) RunExecutable

func (s *SSHExecutor) RunExecutable(path string) error

func (*SSHExecutor) String

func (s *SSHExecutor) String() string

func (*SSHExecutor) UploadFile

func (s *SSHExecutor) UploadFile(localFilePath, remoteFilePath string) error

func (*SSHExecutor) WithIP

func (s *SSHExecutor) WithIP(ip string) *SSHExecutor

func (*SSHExecutor) WithPort

func (s *SSHExecutor) WithPort(port int) *SSHExecutor

func (*SSHExecutor) WithPrivateKeyPath

func (s *SSHExecutor) WithPrivateKeyPath(path string) *SSHExecutor

func (*SSHExecutor) WithUser

func (s *SSHExecutor) WithUser(user string) *SSHExecutor

Jump to

Keyboard shortcuts

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