Documentation
¶
Index ¶
- type Config
- func (c *Config) GetConfigForHost(hostname string) SSHOptions
- func (c *Config) GetConfigForHostWithContext(hostname, originalHost, remoteUser, localUser string, ...) SSHOptions
- func (c *Config) GetConfigForHostWithCtx(ctx *MatchContext) SSHOptions
- func (c *Config) GetHostConfig(hostname string) SSHOptions
- func (c *Config) GetHostConfigCanonicalized(hostname, remoteUser string, tags []string) SSHOptions
- func (c *Config) GetHostConfigWithCtx(ctx *MatchContext) SSHOptions
- type HostConfig
- type MatchBlock
- type MatchCondition
- type MatchContext
- type MatchCriteria
- type Pattern
- type SSHOptions
- type Tristate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Hosts []HostConfig
GlobalOptions SSHOptions
}
func ParseString ¶
func (*Config) GetConfigForHost ¶
func (c *Config) GetConfigForHost(hostname string) SSHOptions
func (*Config) GetConfigForHostWithContext ¶
func (c *Config) GetConfigForHostWithContext(hostname, originalHost, remoteUser, localUser string, isCanonical, isFinal bool) SSHOptions
func (*Config) GetConfigForHostWithCtx ¶
func (c *Config) GetConfigForHostWithCtx(ctx *MatchContext) SSHOptions
func (*Config) GetHostConfig ¶
func (c *Config) GetHostConfig(hostname string) SSHOptions
func (*Config) GetHostConfigCanonicalized ¶
func (c *Config) GetHostConfigCanonicalized(hostname, remoteUser string, tags []string) SSHOptions
func (*Config) GetHostConfigWithCtx ¶
func (c *Config) GetHostConfigWithCtx(ctx *MatchContext) SSHOptions
type HostConfig ¶
type HostConfig struct {
Pattern string
Patterns []Pattern
Config SSHOptions
}
func (*HostConfig) Matches ¶
func (hc *HostConfig) Matches(hostname string) bool
func (*HostConfig) MatchesWithContext ¶
func (hc *HostConfig) MatchesWithContext(hostname, originalHost, remoteUser, localUser string, isCanonical, isFinal bool) bool
func (*HostConfig) MatchesWithCtx ¶
func (hc *HostConfig) MatchesWithCtx(ctx *MatchContext) bool
type MatchBlock ¶
type MatchBlock struct {
Conditions []MatchCondition
Config SSHOptions
}
type MatchCondition ¶
type MatchCondition struct {
Type string
Value string
Negated bool
Values []string
SubConditions []MatchCondition
}
type MatchContext ¶
type MatchContext struct {
Hostname string
OriginalHost string
RemoteUser string
LocalUser string
IsCanonical bool
IsFinal bool
Tags []string
LocalAddrs []net.Addr
}
func NewMatchContext ¶
func NewMatchContext(hostname, originalHost, remoteUser string) *MatchContext
func (*MatchContext) WithCanonical ¶
func (ctx *MatchContext) WithCanonical(isCanonical bool) *MatchContext
func (*MatchContext) WithFinal ¶
func (ctx *MatchContext) WithFinal(isFinal bool) *MatchContext
func (*MatchContext) WithTags ¶
func (ctx *MatchContext) WithTags(tags []string) *MatchContext
type MatchCriteria ¶
type MatchCriteria string
const ( MatchCanonical MatchCriteria = "canonical" MatchFinal MatchCriteria = "final" MatchExec MatchCriteria = "exec" MatchLocalNetwork MatchCriteria = "localnetwork" MatchHost MatchCriteria = "host" MatchOriginalHost MatchCriteria = "originalhost" MatchTagged MatchCriteria = "tagged" MatchUser MatchCriteria = "user" MatchLocalUser MatchCriteria = "localuser" MatchAll MatchCriteria = "all" )
type SSHOptions ¶
type SSHOptions struct {
Hostname string
Port int
User string
AddressFamily string
BindAddress string
BindInterface string
ConnectTimeout int
ConnectionAttempts int
PasswordAuthentication Tristate
PubkeyAuthentication Tristate
HostbasedAuthentication Tristate
GSSAPIAuthentication Tristate
KbdInteractiveAuthentication Tristate
ChallengeResponseAuthentication Tristate
PreferredAuthentications string
IdentitiesOnly Tristate
IdentityFile []string
CertificateFile []string
AddKeysToAgent string
IdentityAgent string
HostKeyAlgorithms string
HostKeyAlias string
StrictHostKeyChecking string
UserKnownHostsFile []string
GlobalKnownHostsFile []string
CheckHostIP Tristate
HashKnownHosts Tristate
VerifyHostKeyDNS string
KnownHostsCommand string
ForwardAgent string
ForwardX11 Tristate
ForwardX11Trusted Tristate
ForwardX11Timeout string
LocalForward []string
RemoteForward []string
DynamicForward []string
GatewayPorts Tristate
ExitOnForwardFailure Tristate
ClearAllForwardings Tristate
ControlMaster string
ControlPath string
ControlPersist string
ServerAliveInterval int
ServerAliveCountMax int
TCPKeepAlive Tristate
LogLevel string
LogVerbose string
Compression Tristate
BatchMode Tristate
RequestTTY string
RemoteCommand string
LocalCommand string
PermitLocalCommand Tristate
SendEnv []string
SetEnv map[string]string
SendEnvPatterns []string
ProxyCommand string
ProxyJump []string
Ciphers string
MACs string
KexAlgorithms string
CASignatureAlgorithms string
HostbasedAcceptedAlgorithms string
PubkeyAcceptedAlgorithms string
RekeyLimit string
IdentityAgentEnv string
UpdateHostKeys string
Tunnel string
TunnelDevice string
EscapeChar string
EnableEscapeCommandline Tristate
CanonicalizeHostname string
CanonicalDomains []string
CanonicalizeMaxDots int
CanonicalizeFallbackLocal Tristate
CanonicalizePermittedCNAMEs []string
Include []string
IgnoreUnknown []string
MatchConditions []MatchCondition
IsMatchBlock bool
Tag string
UnknownOptions map[string][]string
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.