Documentation
¶
Index ¶
- Constants
- func MatchHostPattern(pattern, host string) bool
- func MatchNamePattern(pattern, value string) bool
- func MatchPathPattern(pattern, value string) bool
- func MatchPermitConnect(pattern, target PermitConnect) bool
- func MatchPortPattern(pattern string, port any) bool
- func MatchUserPattern(pattern, user string) bool
- func ParseFrom(s string) (string, error)
- func ParseKey(line []byte) (ssh.PublicKey, string, []string, error)
- func ParseTimespec(s string) (time.Time, error)
- func QuoteOptionValue(s string) string
- func SplitOption(s string) (name, value string, ok bool)
- type AuthorizedKeyOptions
- type Environment
- type PermitConnect
- type PermitSocket
- type PermitTCP
- type Warning
Constants ¶
View Source
const ( MaxInputSize = 256 * 1024 * 1024 // 256MB MaxPermitConnectLength = 1024 MaxPermitTCPLength = 512 MaxPermitSocketLength = 512 )
View Source
const ( MaxLineLength = 16 * 1024 * 1024 // 16MB MaxMacroExpansionDepth = 10 MaxMacroExpansionTokens = 256 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func MatchHostPattern ¶
func MatchNamePattern ¶
func MatchPathPattern ¶
func MatchPermitConnect ¶
func MatchPermitConnect(pattern, target PermitConnect) bool
func MatchPortPattern ¶
func MatchUserPattern ¶
func QuoteOptionValue ¶
func SplitOption ¶
Types ¶
type AuthorizedKeyOptions ¶
type AuthorizedKeyOptions struct {
PermitConnects []PermitConnect `json:"permit_connects"`
PermitOpens []PermitTCP `json:"permit_opens"`
PermitListens []PermitTCP `json:"permit_listens"`
PermitSocketOpens []PermitSocket `json:"permit_socket_opens"`
PermitSocketListens []PermitSocket `json:"permit_socket_listens"`
Environments []Environment `json:"environments"`
Froms []string `json:"froms"`
StartTime *time.Time `json:"start_time"`
ExpiryTime *time.Time `json:"expiry_time"`
TimeWindow *timewindow.TimeWindow `json:"time_window"`
Command string `json:"command"`
NoPortForwarding bool `json:"no_port_forwarding"`
NoSocketForwarding bool `json:"no_socket_forwarding"`
NoPty bool `json:"no_pty"`
NoRecording bool `json:"no_recording"`
Comment string `json:"comment"`
}
func ParseOptions ¶
func ParseOptions(opts []string) (*AuthorizedKeyOptions, error)
type Environment ¶
type Environment struct {
Sign string `json:"sign"`
Name string `json:"name"`
Value string `json:"value"`
}
func ParseEnvironment ¶
func ParseEnvironment(s string) (*Environment, error)
type PermitConnect ¶
type PermitConnect struct {
User string `json:"user"`
Host string `json:"host"`
Port string `json:"port"`
}
func ParsePermitConnect ¶
func ParsePermitConnect(s string) (*PermitConnect, error)
type PermitSocket ¶
type PermitSocket struct {
Path string `json:"path"`
}
func ParsePermitSocket ¶
func ParsePermitSocket(s string) (*PermitSocket, error)
type PermitTCP ¶
func ParsePermitTCP ¶
Click to show internal directories.
Click to hide internal directories.