ssh

package
Version: v0.0.0-...-2443ee7 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 5 Imported by: 0

README

ssh

SSH client for remote command execution.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client SSH Client

func NewClient

func NewClient(config *Config) (*Client, error)

NewClient Factory

func (*Client) Exec

func (c *Client) Exec(command string) (stdout string, stderr string, err error)

Exec execute a command

type Config

type Config struct {
	IP       string `json:"ip"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password,omitempty"`
	Key      string `json:"key,omitempty"`
	Timeout  int    `json:"timeout"`
}

Config SSH Config

func (*Config) Check

func (c *Config) Check() error

Check config

Source Files

Jump to

Keyboard shortcuts

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