remote

package
v0.0.0-...-595af85 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package remote ssh'es into remote machines and runs a command

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCommandWithPipes

func RunCommandWithPipes(cmd string, e Executor) (string, error)

RunCommandWithPipes runs consecutive remote commands that have |

Types

type Executor

type Executor interface {
	SetupKeys(string) error
	CreateClient() error
	CreateSession(string) (SSHSessionInterface, error)
	Run(string, SSHSessionInterface) (string, error)
	Close() error
}

Executor interface for executing remote commands

func NewRemote

func NewRemote(ipaddr, user string, port int32, usageMetricsLogger agentstatus.AgentStatus) Executor

NewRemote attempts to find connect to remote ssh server with private key

type SSHClientInterface

type SSHClientInterface interface {
	ssh.Conn

	NewSession() (*ssh.Session, error)
}

SSHClientInterface abstracts the client struct from ssh package

type SSHSessionInterface

type SSHSessionInterface interface {
	Output(string) ([]byte, error)
	Close() error
}

SSHSessionInterface abstracts the session struct from ssh package

Jump to

Keyboard shortcuts

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