sshclient

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHClient

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

SSHClient implements out common abstraction for SSH

func New

func New(addr string, username string, password string) (*SSHClient, error)

New creates a new SSH client

func (*SSHClient) Close

func (s *SSHClient) Close() error

Close sends "exit" command and closes the SSH connection

func (*SSHClient) Run

func (s *SSHClient) Run(command string) (string, error)

Run executes the given command and returns the output as a string

Jump to

Keyboard shortcuts

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