mux

package
v0.0.0-...-3234629 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mux

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

Mux implements the ssh agent.Agent interface, combining several Agents into one.

func New

func New(req *Request) (*Mux, error)

func (*Mux) Add

func (m *Mux) Add(key agent.AddedKey) error

Add adds a private key to the first agent.

func (*Mux) List

func (m *Mux) List() ([]*agent.Key, error)

List returns the identities known to the agent.

func (*Mux) Lock

func (m *Mux) Lock(passphrase []byte) error

Lock locks the agent. Sign and Remove will fail, and List will empty an empty list. (Unsupported.)

func (*Mux) Remove

func (m *Mux) Remove(key ssh.PublicKey) error

Remove removes all identities with the given public key from the first agent.

func (*Mux) RemoveAll

func (m *Mux) RemoveAll() error

RemoveAll removes all identities from the first agent.

func (*Mux) Sign

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

Sign attempts to sign data using the connected agents.

func (*Mux) Signers

func (m *Mux) Signers() ([]ssh.Signer, error)

Signers returns signers for all the known keys.

func (*Mux) Unlock

func (m *Mux) Unlock(passphrase []byte) error

Unlock undoes the effect of Lock (Unsupported.)

type Request

type Request struct {
	Sockets []string  // Paths to SSH agent sockets to combine
	Logger  io.Writer // If not nil, logs will be written here
}

Jump to

Keyboard shortcuts

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