ssh

package
v0.0.62 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyOnSize added in v0.0.41

type ApplyOnSize func(s *Ssh, size int64)

type Ssh

type Ssh struct {
	Config  *SshAuth
	Client  *ssh.Client
	Session *ssh.Session
	// contains filtered or unexported fields
}

func NewSsh

func NewSsh(config *SshAuth) *Ssh

func (*Ssh) AddBar

func (s *Ssh) AddBar(bar io.Writer)

func (*Ssh) DownloadFile added in v0.0.41

func (s *Ssh) DownloadFile(remoteFile string, localFile string, display bool, close bool, fn ...ApplyOnSize) bool

func (*Ssh) Exec

func (s *Ssh) Exec(cmd string, close bool) *bytes.Buffer

func (*Ssh) InitDial

func (s *Ssh) InitDial()

func (*Ssh) Scp

func (s *Ssh) Scp() *sftp.Client

func (*Ssh) ScpDownload

func (s *Ssh) ScpDownload(remoteFile string, localFile string, close bool) bool

type SshAuth

type SshAuth struct {
	Host string `yaml:"host"`
	Type string `yaml:"type"`
	Port int    `yaml:"port"`
	User string `yaml:"user"`
}

Jump to

Keyboard shortcuts

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