Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostKey ¶
func NewRSAHostKey ¶
type KeyStore ¶
type KeyStore interface {
// Authentication methods configured to use this KeyStore.
Auth() []ssh.AuthMethod
// The raw private key bytes, as stored on disk.
KeyBytes() []byte
// Path to the private key
KeyPath() string
// The public key bytes, as stored on disk
PublicKey() []byte
}
A KeyStore stores a single private key and the matching public key. It provides various methods to access both public and private key.
type KnownHosts ¶
type KnownHosts interface {
// Add the key for use by the given hosts
AddHost(key string, hosts ...string)
// Returns a HostKeyCallback and HostKeyAlgorithms for use in ssh clients with the currently known hosts
AsHostKeyConfig() (ssh.HostKeyCallback, []string)
// Writes a "ssh" compatible representation of the known hosts to the given writer
AsKnownHostsFile(writer io.Writer) error
}
A go implementation of ~/.ssh/known_hosts
func NewKnownHosts ¶
func NewKnownHosts() KnownHosts
Create a new KnownHosts instance. Doesn't trust any hosts by default
Click to show internal directories.
Click to hide internal directories.