Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostKeyCallback ¶
type HostKeyCallback struct {
// contains filtered or unexported fields
}
HostKeyCallback is a wrapper around ssh.KnownHosts so that we can add all unknown hosts in a single batch to the known_hosts file.
func InitSSHAuthMethods ¶
func InitSSHAuthMethods(trustAllHosts bool, throttleCh chan struct{}) ([]gossh.AuthMethod, *HostKeyCallback)
InitSSHAuthMethods initialises all known SSH auth methods on othe client side.
func NewHostKeyCallback ¶
func NewHostKeyCallback(knownHostsPath string, trustAllHosts bool, throttleCh chan struct{}) (*HostKeyCallback, error)
NewHostKeyCallback returns a new wrapper.
func (*HostKeyCallback) PromptAddHosts ¶
func (h *HostKeyCallback) PromptAddHosts(stop <-chan struct{})
PromptAddHosts prompts a question to the user whether unknown hosts should be added to the known hosts or not.
func (*HostKeyCallback) Untrusted ¶
func (h *HostKeyCallback) Untrusted(server string) bool
Untrusted returns true if the host is not trusted. False otherwise.
func (*HostKeyCallback) Wrap ¶
func (h *HostKeyCallback) Wrap() ssh.HostKeyCallback
Wrap the host key callback.
Click to show internal directories.
Click to hide internal directories.