Documentation ¶
Overview ¶
A runner package that executes commands on remote hosts.
Index ¶
- func AddKnownHost(host string, remote net.Addr, key ssh.PublicKey, knownFile string) (err error)
- func CheckKnownHost(host string, remote net.Addr, key ssh.PublicKey, knownFile string) (found bool, err error)
- func DefaultIdentityFilePath() (string, error)
- func DefaultKnownHosts() (ssh.HostKeyCallback, error)
- func DefaultKnownHostsPath() (string, error)
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddKnownHost ¶ added in v0.2.12
AddKnownHost adds a host to the provided known hosts file, if no known hosts file is provided, it will fallback to default known_hosts file
func CheckKnownHost ¶ added in v0.2.12
func CheckKnownHost(host string, remote net.Addr, key ssh.PublicKey, knownFile string) (found bool, err error)
CheckKnownHost checks if a host is in known hosts file, if no known hosts file is provided, it will fallback to default known_hosts file
func DefaultIdentityFilePath ¶ added in v0.2.12
func DefaultKnownHosts ¶ added in v0.2.12
func DefaultKnownHosts() (ssh.HostKeyCallback, error)
DefaultKnownHosts returns a host key callback from default known hosts path
func DefaultKnownHostsPath ¶ added in v0.2.12
DefaultKnownHostsPath returns default user ~/.ssh/known_hosts file
Types ¶
type Runner ¶ added in v0.2.12
type Runner struct { Hostname string Port int *ssh.ClientConfig }
func (Runner) UseIdentityFile ¶ added in v0.2.12
func (Runner) UsePassword ¶ added in v0.2.12
Click to show internal directories.
Click to hide internal directories.