Documentation ¶
Index ¶
- func Fingerprint(k ssh.PublicKey) string
- func HostKey(path string) (ssh.Signer, error)
- func PublicKeyFile(path string) ssh.AuthMethod
- func PublicKeyIsAuthorized(key ssh.PublicKey) (bool, error)
- func SSHAgent() ssh.AuthMethod
- type Keystore
- func (store *Keystore) Add(user User)
- func (store *Keystore) Get(command string, usernames ...string)
- func (store *Keystore) Read(usernames ...string)
- func (store *Keystore) Remove(usernames ...string)
- func (store *Keystore) Save()
- func (store *Keystore) String(prefix string, usernames ...string) string
- func (store *Keystore) Sync(command string, usernames ...string)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fingerprint ¶
func PublicKeyFile ¶
func PublicKeyFile(path string) ssh.AuthMethod
func SSHAgent ¶
func SSHAgent() ssh.AuthMethod
ParsePrivateKey returns a Signer from a PEM encoded private key. It supports the same keys as ParseRawPrivateKey.
Types ¶
type Keystore ¶
Keystore represents a concurrency safe collection of public keys associated with usernames.
func NewKeystore ¶
func NewKeystore() *Keystore
NewKeystore provides a standard way to instiantiate a Keystore.
func (*Keystore) Get ¶
Get queries external sources for the public keys associated with the specified usernames.
func (*Keystore) Remove ¶
Remove the usernames from the key collection. If no usernames were specified all associated users will be removed.
func (*Keystore) Save ¶
func (store *Keystore) Save()
Save writes the key store to the ```authorized_keys``` file while attempting to preserve non-generated settings.
Click to show internal directories.
Click to hide internal directories.