sshagent

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHAgent

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

func NewSSHAgent

func NewSSHAgent(ctx context.Context, upstreamSocket, localSocketFile string) *SSHAgent

func (*SSHAgent) Add

func (s *SSHAgent) Add(key agent.AddedKey) error

Add only add private key into local agent

func (*SSHAgent) Close

func (s *SSHAgent) Close()

func (*SSHAgent) Extension

func (s *SSHAgent) Extension(extensionType string, contents []byte) ([]byte, error)

func (*SSHAgent) List

func (s *SSHAgent) List() ([]*agent.Key, error)

List return all keys from upstream and local agent

func (*SSHAgent) LoadLocalKeys

func (s *SSHAgent) LoadLocalKeys(keys ...string)

LoadLocalKeys load local keys from files

func (*SSHAgent) Lock

func (s *SSHAgent) Lock(passphrase []byte) error

Lock only lock local agent

func (*SSHAgent) Remove

func (s *SSHAgent) Remove(key ssh.PublicKey) error

Remove only remove key from local agent

func (*SSHAgent) RemoveAll

func (s *SSHAgent) RemoveAll() error

RemoveAll only remove all key from local agent

func (*SSHAgent) Serve

func (s *SSHAgent) Serve() error

func (*SSHAgent) Sign

func (s *SSHAgent) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error)

func (*SSHAgent) SignWithFlags

func (s *SSHAgent) SignWithFlags(key ssh.PublicKey, data []byte, flags agent.SignatureFlags) (*ssh.Signature, error)

SignWithFlags generate signature a with public key from upstream and local agent

func (*SSHAgent) Signers

func (s *SSHAgent) Signers() (out []ssh.Signer, _ error)

Signers return all signers from upstream and local agent

func (*SSHAgent) Unlock

func (s *SSHAgent) Unlock(passphrase []byte) error

Unlock only unlock local agent

Jump to

Keyboard shortcuts

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