utilSsh

package
v0.0.0-...-cc44b38 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PROXY_TYPE_SOCKS5 = "socks5"

Variables

This section is empty.

Functions

This section is empty.

Types

type SshClient

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

func NewSshClient

func NewSshClient() (client *SshClient)

func (*SshClient) Close

func (c *SshClient) Close()

func (*SshClient) Connect

func (c *SshClient) Connect(addr string, user string, password string, timeout ...time.Duration) (err error)

func (*SshClient) Exec

func (c *SshClient) Exec(command string, wait ...bool) (output string, err error)

func (*SshClient) SFtpClient

func (c *SshClient) SFtpClient() (sftpClient *sftp.Client, err error)

func (*SshClient) SendFile

func (c *SshClient) SendFile(localFile string, remoteFile string) (err error)

func (*SshClient) UseProxySocks5

func (c *SshClient) UseProxySocks5(proxyAddr string, proxyUser string, proxyPassword string) (err error)

type SshExecFunc

type SshExecFunc func(sshClient *SshClient) error

Jump to

Keyboard shortcuts

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