Help us shape the future of Go! Take the 2026 Go Developer Survey

ssh

package
v0.81.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJSInterface

func CreateJSInterface(client *Client) js.Value

CreateJSInterface creates a JavaScript interface for the SSH client

Types

type Client

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

func NewClient

func NewClient(nbClient *netbird.Client) *Client

NewClient creates a new SSH client

func (*Client) Close

func (c *Client) Close() error

Close closes the SSH connection

func (*Client) Connect

func (c *Client) Connect(host string, port int, username, jwtToken string, ipVersion int) error

Connect establishes an SSH connection through NetBird network. ipVersion may be 4, 6, or 0 for automatic selection.

func (*Client) Read

func (c *Client) Read(buffer []byte) (int, error)

Read reads data from the SSH session

func (*Client) Resize

func (c *Client) Resize(cols, rows int) error

Resize updates the terminal size

func (*Client) StartSession

func (c *Client) StartSession(cols, rows int) error

StartSession starts an SSH session with PTY. It holds the client lock for the whole startup so Close cannot tear the client down mid-setup and the new session cannot be installed into an already closed client.

func (*Client) Write

func (c *Client) Write(data []byte) (int, error)

Write sends data to the SSH session

Jump to

Keyboard shortcuts

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