xssh2

package
v0.0.0-...-89edfd8 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 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 Client

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

Client is the ssh client

func NewClient

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

NewClient returns new ssh client

func (*Client) Connect

func (c *Client) Connect(ip, port string) (*ssh.Client, error)

Connect will open connection to the remote server and perform the SSH handshake.

func (*Client) Run

func (c *Client) Run(sshClient *ssh.Client, cmds []string) error

Run will run all commands

type Config

type Config struct {
	User           string
	PrivateKeyFile string
}

Config contains the ssh config

Jump to

Keyboard shortcuts

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