ssh

package
v0.12.19 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Host           string
	Port           int
	User           string
	PrivateKeyFile string
}

Client is used to connect over ssh to a remote host.

func NewClient

func NewClient(config ClientConfiguration) *Client

NewClient is used to create a new client!

func (*Client) Connect

func (client *Client) Connect() error

Connect will try and connect up an SSH session

func (*Client) Run added in v0.1.4

func (client *Client) Run(command string, silent bool) (output string, err error)

Run will try and run an SSH command over a client

type ClientConfiguration

type ClientConfiguration struct {
	Host           string
	Port           int
	User           string
	PrivateKeyFile string
}

ClientConfiguration is used to create a client

Jump to

Keyboard shortcuts

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