sshclient

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package sshclient provides SSH-based operations for NV-Switch NVOS management. This is used for CPLD and NVOS firmware updates that require SSH access.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NVOSClient

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

NVOSClient provides SSH-based operations for NV-Switch NVOS.

func New

func New(ctx context.Context, n *nvos.NVOS) (*NVOSClient, error)

New creates a new NVOSClient for the given NVOS subsystem using its configured port.

func NewWithPort

func NewWithPort(ctx context.Context, n *nvos.NVOS, port int) (*NVOSClient, error)

NewWithPort creates a new NVOSClient for the given NVOS subsystem with a custom port.

func (*NVOSClient) Close

func (c *NVOSClient) Close() error

Close closes the SSH connection.

func (*NVOSClient) CopyFile

func (c *NVOSClient) CopyFile(localPath, remotePath string) error

CopyFile copies a local file to the remote NVOS.

func (*NVOSClient) RunCommand

func (c *NVOSClient) RunCommand(cmd string) (string, error)

RunCommand executes a command on the NVOS and returns the output.

Jump to

Keyboard shortcuts

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