ssh

package
v0.0.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CliSsh

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

func NewSSHClient

func NewSSHClient(user, pwd, ip string, port int) *CliSsh

func (*CliSsh) Close

func (c *CliSsh) Close() error

func (*CliSsh) Connect

func (c *CliSsh) Connect() error

func (*CliSsh) DownloadFile

func (c *CliSsh) DownloadFile(remoteFile, localPath string) error

func (*CliSsh) DownloadFileOrDir

func (c *CliSsh) DownloadFileOrDir(remotePath, localPath string) error

func (*CliSsh) Run

func (c *CliSsh) Run(cmd string) (string, error)

func (*CliSsh) RunCmdS

func (c *CliSsh) RunCmdS(cmds []string) error

func (*CliSsh) SessionRequestPty

func (c *CliSsh) SessionRequestPty() (*ssh.Session, error)

func (*CliSsh) UploadFile

func (c *CliSsh) UploadFile(localFile, remotePath string, sameLevel bool) error

func (*CliSsh) UploadFileOrDir

func (c *CliSsh) UploadFileOrDir(localPath, remotePath string) error

Jump to

Keyboard shortcuts

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