pageant

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 10 Imported by: 1

README

GoDoc

Package pageant provides an interface to PyTTY pageant.exe utility.

This package is windows-only.

See documentation on GoDoc

License: MIT

Documentation

Rendered for windows/amd64

Overview

Package pageant provides an interface to the PuTTY Pageant (pageant.exe) SSH agent. This package is Windows-only.

Index

Constants

View Source
const MaxMessageLen = 256 * 1024

MaxMessageLen is the maximum size (including the 4-byte length prefix) of a request to or a response from Pageant. It matches AGENT_MAX_MSGLEN of modern PuTTY versions.

Variables

View Source
var (
	// ErrPageantNotFound is returned when the Pageant window is not found.
	ErrPageantNotFound = errors.New("pageant process not found")
	// ErrSendMessage is returned when Pageant rejects or fails the request.
	ErrSendMessage = errors.New("error sending message")

	// ErrMessageTooLong is returned when the request exceeds MaxMessageLen.
	ErrMessageTooLong = errors.New("message too long")
	// ErrInvalidMessageFormat is returned when the request's length prefix
	// does not match its actual length.
	ErrInvalidMessageFormat = errors.New("invalid message format")
	// ErrResponseTooLong is returned when Pageant's response exceeds MaxMessageLen.
	ErrResponseTooLong = errors.New("response too long")
)
View Source
var Timeout = 5 * time.Minute

Timeout limits how long a single request waits for Pageant's reply. It is generous because Pageant may ask the user for a key passphrase. Set it before using the agent.

Functions

func Available

func Available() bool

Available returns true if Pageant is running.

func New

func New() agent.Agent

New returns a new ssh-agent client (see golang.org/x/crypto/ssh/agent) connected to Pageant.

Types

This section is empty.

Jump to

Keyboard shortcuts

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