connections

package
v0.0.0-...-5103e3a Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	TestConnection() error
	Run(cmd string, expect string) (string, error)
}

type SSH

type SSH struct {
	IP   net.IP
	Port string

	Results *helpers.Queue
	Logs    *helpers.Queue
	// contains filtered or unexported fields
}

func NewSSH

func NewSSH(port uint16, params map[string]interface{}) (SSH, error)

NewSSH

func (*SSH) Log

func (s *SSH) Log(txt string)

func (*SSH) ParseKey

func (s *SSH) ParseKey(privateKey []byte) error

func (*SSH) ParseKeyWithPassphrase

func (s *SSH) ParseKeyWithPassphrase(privateKey, passphrase []byte) error

func (SSH) Run

func (s SSH) Run(cmd string, expect string) (string, error)

func (*SSH) SetIP

func (s *SSH) SetIP(ip string) error

func (*SSH) SetKey

func (s *SSH) SetKey(key ssh.Signer)

func (*SSH) SetPassword

func (s *SSH) SetPassword(password string)

func (*SSH) SetUser

func (s *SSH) SetUser(username string) error

func (SSH) TestConnection

func (s SSH) TestConnection() error

Jump to

Keyboard shortcuts

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