ssh

package
v0.0.0-...-c7cde22 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: BSD-3-Clause Imports: 8 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSSHClient

func NewSSHClient(conf ClientConfig) (*ssh.Client, error)

Types

type AuthMethod

type AuthMethod string
const (
	PASSWORD  AuthMethod = "password"
	PUBLICKEY AuthMethod = "publickey"
)

type ClientConfig

type ClientConfig struct {
	AuthMethod AuthMethod    `json:"auth_method"`
	Host       string        `json:"host"`
	User       string        `json:"user"`
	Password   string        `json:"password"`
	Key        string        `json:"key"`
	Passphrase string        `json:"passphrase"`
	Timeout    time.Duration `json:"timeout"`
}

func ClientConfigPassword

func ClientConfigPassword(host, user, password string) *ClientConfig

func ClientConfigPublicKey

func ClientConfigPublicKey(host, user, key, passphrase string) *ClientConfig

type MessagePing

type MessagePing struct {
	Ping bool `json:"ping"`
}

type MessageResize

type MessageResize struct {
	Resize  bool `json:"resize"`
	Columns int  `json:"columns"`
	Rows    int  `json:"rows"`
}

type Turn

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

func NewTurn

func NewTurn(ctx context.Context, ws *websocket.Conn, client *ssh.Client) (*Turn, error)

func (*Turn) Close

func (t *Turn) Close()

func (*Turn) Handle

func (t *Turn) Handle(ctx context.Context) error

func (*Turn) Wait

func (t *Turn) Wait()

func (*Turn) Write

func (t *Turn) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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