Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchPatternList ¶
MatchPatternList returns true if the input matches any of the patterns in the list. Negated patterns are matched first; if a negated pattern matches, the function returns false immediately. If no patterns match, the function
Types ¶
type AllowedSigner ¶
type AllowedSigner struct { Key ssh.PublicKey Principals []*Pattern Namespaces []*Pattern IsCA bool ValidAfter *time.Time ValidBefore *time.Time }
func ParseAllowedSigners ¶
func ParseAllowedSigners(in []byte) ([]AllowedSigner, error)
ParseAllowedSigners parses a list of AllowedSigners from a byte slice.
type AuthorizedKey ¶
type AuthorizedKey struct { Key ssh.PublicKey Comment string Principals []string IsCA bool Command sql.NullString Environment map[string]string ExpiryTime sql.NullTime AgentForwarding bool From []*Pattern PortForwarding bool Pty bool UserRC bool X11Forwarding bool PermitListen sql.NullString PermitOpen sql.NullString NoTouchReq bool VerifyReq bool Tunnel sql.NullString }
AuthorizedKey represents an SSH authorized_keys entry
func NewAuthorizedKey ¶
func (*AuthorizedKey) MatchesPrincipal ¶
func (k *AuthorizedKey) MatchesPrincipal(input string) bool
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
Pattern is a pattern in a Host declaration. Patterns are read-only values; create a new one with NewPattern().
func NewPattern ¶
NewPattern creates a new Pattern for matching hosts. NewPattern("*") creates a Pattern that matches all hosts.
From the manpage, a pattern consists of zero or more non-whitespace characters, `*' (a wildcard that matches zero or more characters), or `?' (a wildcard that matches exactly one character). For example, to specify a set of declarations for any host in the ".co.uk" set of domains, the following pattern could be used:
Host *.co.uk
The following pattern would match any host in the 192.168.0.[0-9] network range:
Host 192.168.0.?