ssh

package
v0.0.0-...-456a8e1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sftp

type Sftp struct {
	*Terminal
	// contains filtered or unexported fields
}

func NewSftp

func NewSftp(target, user, password, privateKey, privateKeyPass string) *Sftp

func (*Sftp) Close

func (s *Sftp) Close()

func (*Sftp) Dial

func (s *Sftp) Dial() (err error)

func (*Sftp) Mkdir

func (s *Sftp) Mkdir(path string)

func (*Sftp) ParseRemoteDirectory

func (s *Sftp) ParseRemoteDirectory(path string) string

func (*Sftp) Stat

func (s *Sftp) Stat(path string) (os.FileInfo, error)

func (*Sftp) Upload

func (s *Sftp) Upload(localPath, remotePath string)

type Terminal

type Terminal struct {
	Target         string
	User           string
	Password       string
	PrivateKey     string
	PrivateKeyPass string
	// contains filtered or unexported fields
}

Terminal ssh 终端

func NewTerminal

func NewTerminal(target, user, password, privateKey, privateKeyPass string) *Terminal

func (*Terminal) Close

func (t *Terminal) Close()

func (*Terminal) Dial

func (t *Terminal) Dial() (err error)

func (*Terminal) Start

func (t *Terminal) Start() error

func (*Terminal) Wait

func (t *Terminal) Wait() error

func (*Terminal) WindowChange

func (t *Terminal) WindowChange(h, w int)

Jump to

Keyboard shortcuts

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