session

package
v0.0.0-...-ef38420 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchEnvPattern

func MatchEnvPattern(pattern, name string) bool

MatchEnvPattern matches an environment variable name against a SendEnv pattern. Patterns can use * and ? wildcards. A '-' prefix negates.

func MatchGlob

func MatchGlob(pattern, value string) bool

MatchGlob performs simple glob matching with * and ? wildcards.

Types

type AgentHandler

type AgentHandler struct{}

AgentHandler implements sshclient.AgentForwarder.

func (*AgentHandler) ForwardAgent

func (h *AgentHandler) ForwardAgent(sshClient *ssh.Client, session *ssh.Session, opts *sshclient.Options) error

ForwardAgent enables SSH agent forwarding on a session.

type Handler

type Handler struct {
	PTYRequested bool // set after PTY is successfully requested
	HasCommand   bool // whether a remote command was specified
}

Handler implements sshclient.SessionConfigurator.

func NewHandler

func NewHandler(hasCommand bool) *Handler

NewHandler creates a Handler.

func (*Handler) ConfigureSession

func (h *Handler) ConfigureSession(session *ssh.Session, opts *sshclient.Options) error

ConfigureSession sets up environment variables and PTY allocation.

Jump to

Keyboard shortcuts

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