ssh

package
v0.0.0-...-c53fdc3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package ssh contains utilities that help gather logs, etc. on failures using ssh.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadPrivateSSHKeys

func LoadPrivateSSHKeys(paths []string) (map[string]interface{}, error)

LoadPrivateSSHKeys try to optimistically load PRIVATE SSH keys from the all paths.

func NewClient

func NewClient(user, address string, keys []string) (*ssh.Client, error)

NewClient creates a new SSH client which can be used to SSH to address using user and the keys.

if keys list is empty, it tries to load the keys from the user's environment.

func PullFileTo

func PullFileTo(client *ssh.Client, remotePath, localPath string) error

PullFileTo downloads the file from remote server using SSH connection and writes to localPath.

func Run

func Run(client *ssh.Client, command string) error

Run uses an SSH client to execute commands.

Types

This section is empty.

Jump to

Keyboard shortcuts

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