ssh

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnConfig

type ConnConfig struct {
	Host       string
	Port       int
	User       string
	Pass       string
	PrivateKey string
	Passphrase string
}

type SSH

type SSH struct {
	Connected bool
	Client    *ssh2.Client
	Auth      ssh2.ClientConfig
	Config    ConnConfig
}

func New

func New(c ConnConfig) *SSH

func (*SSH) Connect

func (f *SSH) Connect() error

func (*SSH) Disconnect

func (f *SSH) Disconnect() error

func (*SSH) RunCommands

func (f *SSH) RunCommands(commands []string) (string, error)

Jump to

Keyboard shortcuts

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