ssh

package
v0.0.0-...-0fd93ca Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: MIT Imports: 8 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 {
	ServerInfo *host.ServerInfo
	// contains filtered or unexported fields
}

func NewClient

func NewClient(params *ClientParams) (*Client, error)

NewClient create a new Client for ssh from given params ClientParams.

func (*Client) OpenShell

func (c *Client) OpenShell() error

OpenShell starts the shell on the remote host in Client.

func (*Client) Run

func (c *Client) Run(cmd string) error

Run runs the given cmd on the remote host in Client.

type ClientParams

type ClientParams struct {
	ServerInfo *host.ServerInfo
	StdIn      io.Reader
	Stdout     io.Writer
	Stderr     io.Writer
}

Jump to

Keyboard shortcuts

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