Documentation ¶
Index ¶
- type Builder
- func (b Builder) Dial() (*ssh.Client, error)
- func (b Builder) GetError() error
- func (b Builder) GetErrors() []error
- func (b Builder) ResumeErrors() Builder
- func (b Builder) String() string
- func (b Builder) SuspendErrors() Builder
- func (b Builder) WithDefaultAgent() Builder
- func (b Builder) WithHost(h string) Builder
- func (b Builder) WithHostPort(str string) Builder
- func (b Builder) WithInsecureIgnoreHostKey() Builder
- func (b Builder) WithKnownHostsFiles(khf ...string) Builder
- func (b Builder) WithPassword(password string) Builder
- func (b Builder) WithPort(port int) Builder
- func (b Builder) WithUsername(u string) Builder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder objects are built up through use of With* and friends. These are copied by value during creation so each one may be a branching point or be passed to any number of Dials.
func (Builder) SuspendErrors ¶
Prevent errors from being recorded
func (Builder) WithDefaultAgent ¶
Use the default agent as provided by the environment, similarly to how ssh would find the agent.
func (Builder) WithHostPort ¶
Set the host:port for the connection
Mutually exclusive with WithHost and WithPort
func (Builder) WithInsecureIgnoreHostKey ¶
Ignore host keys (insecure!)
Mutually exclusive with WithKnownHostsFiles
func (Builder) WithKnownHostsFiles ¶
Add a known hosts file
This will disable ignoring unknown hosts as well for safety. If you must also ignore unknown hosts if they haven't been set, call IgnoreUnknownHosts(true) after calling AddKnownHostsFile(f).
Mutually exclusive with WithInsecureIgnoreHostKey
func (Builder) WithPassword ¶
Add a password auth method to the client which provides the passed password.
func (Builder) WithUsername ¶
Set the username for the connection