sshkeys

package
v1.16.6 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: BSD-4-Clause, MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultKeyPath = filepath.Join(config.HomeDir(), ".ssh", "id_rsa")
)

Functions

func ReadPrivateKey

func ReadPrivateKey(path string) (ssh.Signer, error)

func ReadPrivateKeyWithContent

func ReadPrivateKeyWithContent(path string, privateKeyContent []byte) (ssh.Signer, error)

func ReadPrivateKeysFromAgent

func ReadPrivateKeysFromAgent() ([]ssh.Signer, io.Closer, error)

Types

type PasswordMethod

type PasswordMethod func(prompt string) (string, error)

type PrivateKey

type PrivateKey struct {
	Path  string
	Block *pem.Block
	PasswordMethod
}

func (*PrivateKey) IsEncrypted

func (p *PrivateKey) IsEncrypted() bool

func (*PrivateKey) Signer

func (p *PrivateKey) Signer() (ssh.Signer, error)

Jump to

Keyboard shortcuts

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