sshagent

package
v1.43.6 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 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

This section is empty.

Types

type AgentServer

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

AgentServer is an ssh agent that can be served and shutdown at a later time

func NewAgentServer

func NewAgentServer(source *Source) (*AgentServer, error)

NewAgentServer creates a new agent on the host

func (*AgentServer) Serve

func (a *AgentServer) Serve(processLabel string) (string, error)

Serve starts the SSH agent on the host and returns the path of the socket where the agent is serving

func (*AgentServer) ServePath

func (a *AgentServer) ServePath() string

ServePath returns the path where the agent is serving

func (*AgentServer) Shutdown

func (a *AgentServer) Shutdown() error

Shutdown shuts down the agent and closes the socket

type Source

type Source struct {
	Socket string
	Keys   []any
}

Source is what the forwarded agent's source is The source of the forwarded agent can be from a socket on the host, or from individual key files

func NewSource

func NewSource(paths []string) (*Source, error)

NewSource takes paths and checks of they are keys or sockets, and creates a source

Jump to

Keyboard shortcuts

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