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

ssh

package
v0.3.228 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHeight = 40
	DefaultWidth  = 80
)

Variables

This section is empty.

Functions

func MarshalED25519PrivateKey added in v0.0.452

func MarshalED25519PrivateKey(key ed25519.PrivateKey, comment string) []byte

// stolen from `mikesmitty`, thanks, you are a mikesmitty and a scholar

Types

type Client

type Client struct {
	Addr string
	User string

	Dial func(ctx context.Context, network, addr string) (net.Conn, error)

	PrivateKey, Certificate string

	Client *ssh.Client
	// contains filtered or unexported fields
}

func (*Client) Close

func (c *Client) Close() error

func (*Client) Connect

func (c *Client) Connect(ctx context.Context) error

func (*Client) Shell

func (c *Client) Shell(ctx context.Context, sessIO *SessionIO, cmd string, container string) error

type FdReader

type FdReader interface {
	io.Reader
	Fd() uintptr
}

FdReader is an io.Reader with an Fd function

type SessionIO added in v0.0.504

type SessionIO struct {
	Stdin  io.Reader
	Stdout io.WriteCloser
	Stderr io.WriteCloser

	AllocPTY bool
	TermEnv  string
}

Jump to

Keyboard shortcuts

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