sshagent

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

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   []interface{}
}

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