sshx

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 14 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(gateway term.Endpoint) (ssh.AuthMethod, error)

func Connect added in v1.11.1

func Connect(ctx context.Context, gateways []term.Endpoint) (*ssh.Client, error)

Connect 顺次连接多级网关跳转最终建立 SSH 客户端连接。

func ConnectToNextJumpHost

func ConnectToNextJumpHost(ctx context.Context, currentClient *ssh.Client, user string, host string, port int, method ssh.AuthMethod) (*ssh.Client, error)

Types

type SSHConnect

type SSHConnect struct {
	StdinPipe io.WriteCloser
	// contains filtered or unexported fields
}

func NewSSHConnect

func NewSSHConnect(client *ssh.Client, conn *websocket.Conn, height, width int) (sshConn *SSHConnect, err error)

func (*SSHConnect) SendMessageToWebSocket

func (s *SSHConnect) SendMessageToWebSocket(msg string) error

func (*SSHConnect) Start

func (s *SSHConnect) Start()

func (*SSHConnect) Stop

func (s *SSHConnect) Stop()

func (*SSHConnect) WindowChange

func (s *SSHConnect) WindowChange(h int, w int) error

type TerminalMessage

type TerminalMessage struct {
	Operation string `json:"operation"`
	Data      string `json:"data"`
	Cols      int    `json:"cols"`
	Rows      int    `json:"rows"`
}

func NewMessage

func NewMessage(operation string, data string, cols, rows int) TerminalMessage

func ParseTerminalMessage

func ParseTerminalMessage(value []byte) (TerminalMessage, error)

Jump to

Keyboard shortcuts

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