ssh

package
v0.0.0-...-772fc7e Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScpPushBeginFile      = "C"
	ScpPushBeginFolder    = "D"
	ScpPushBeginEndFolder = "0"
	ScpPushEndFolder      = "E"
	ScpPushEnd            = "\x00"
)

Constants

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(filePath, destinationPath string, session *ssh.Session) error

func CopyFile

func CopyFile(filePath, destinationPath string, session *ssh.Session) error

func GetPerm

func GetPerm(f *os.File) (perm string)

func NewConnection

func NewConnection(cfg Cfg) (connector.Connection, error)

Types

type Cfg

type Cfg struct {
	Username    string
	Password    string
	Address     string
	Port        int
	PrivateKey  string
	KeyFile     string
	AgentSocket string
	Timeout     time.Duration
	Bastion     string
	BastionPort int
	BastionUser string
}

type Dialer

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

func NewDialer

func NewDialer() *Dialer

func (*Dialer) Connect

func (dialer *Dialer) Connect(host config.HostCfg) (connector.Connection, error)

Jump to

Keyboard shortcuts

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