ssh

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintCertificate added in v1.3.0

func PrintCertificate(cert *ssh.Certificate, w io.Writer) error

Types

type Agent added in v0.5.0

type Agent struct {
	agent.ExtendedAgent
	// contains filtered or unexported fields
}

func GetSSHAgent added in v0.5.0

func GetSSHAgent(authSock string) (*Agent, error)

Get an SSH agent

func (*Agent) Close added in v0.5.0

func (a *Agent) Close() error

type AgentKeyManager added in v0.7.0

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

func (*AgentKeyManager) GetKey added in v0.7.0

GetKey will generate new ssh keypair

func (*AgentKeyManager) HasValidCertificate added in v0.7.0

func (a *AgentKeyManager) HasValidCertificate() (bool, error)

func (*AgentKeyManager) ListCertificates added in v0.7.0

func (a *AgentKeyManager) ListCertificates() ([]*ssh.Certificate, error)

func (*AgentKeyManager) WriteKey added in v0.7.0

func (a *AgentKeyManager) WriteKey(
	priv crypto.PrivateKey,
	cert *ssh.Certificate,
) error

WriteKey will write the key and certificate to the agent

type KeyManager added in v0.7.0

type KeyManager interface {
	GetKey() (crypto.PublicKey, crypto.PrivateKey, error)
	WriteKey(crypto.PrivateKey, *ssh.Certificate) error
	HasValidCertificate() (bool, error)
	ListCertificates() ([]*ssh.Certificate, error)
}

func NewAgentKeyManager added in v0.7.0

func NewAgentKeyManager(agent agent.ExtendedAgent) KeyManager

Jump to

Keyboard shortcuts

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