remote

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Remote

type Remote struct {
	Config ssh.ClientConfig

	Client *ssh.Client
	// contains filtered or unexported fields
}

func NewRemoteConnection

func NewRemoteConnection(user, ip, port, privateKey string) (*Remote, error)

func (*Remote) Close

func (r *Remote) Close() error

Close closes the ssh connection

func (*Remote) MakeNewConnection

func (r *Remote) MakeNewConnection() error

MakeNewConnection initiates new ssh connection to given host

func (*Remote) RunCommand

func (r *Remote) RunCommand(cmd string) error

RunCommand runs a single command over a ssh connection

func (*Remote) RunCommands

func (r *Remote) RunCommands(cmds []string)

RunCommands runs mutiple commands in ssh connection FIX: Need to be re looked at

func (*Remote) SpawnShell

func (r *Remote) SpawnShell() error

SpawnShell spwans shell on remote machine Ctrl-C exits the shell

Jump to

Keyboard shortcuts

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