client

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

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

Wrap the host key callback.

Jump to

Keyboard shortcuts

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