Documentation
¶
Index ¶
- Variables
- func ConfigureSSHClient(privateKeyPath string) (*ssh.ClientConfig, error)
- func ConfigureSSHServer(hostKeyPath string, authorizedKeys []ssh.PublicKey) (*ssh.ServerConfig, error)
- func LoadAuthorizedKeys(path string) ([]ssh.PublicKey, error)
- type Agent
- func (agent *Agent) Execute(c *Command, out chan string) error
- func (agent *Agent) Ping()
- func (agent *Agent) ReadConfig(path string) error
- func (agent *Agent) ResolveBinary(name string) (string, error)
- func (agent *Agent) ResolvePathsIn(c *Command) error
- func (agent *Agent) Run()
- func (agent *Agent) ServeOne(l net.Listener, async bool)
- type Client
- type Command
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var SIGSTRING = map[syscall.Signal]string{ syscall.SIGABRT: "ABRT", syscall.SIGALRM: "ALRM", syscall.SIGFPE: "FPE", syscall.SIGHUP: "HUP", syscall.SIGILL: "ILL", syscall.SIGINT: "INT", syscall.SIGKILL: "KILL", syscall.SIGPIPE: "PIPE", syscall.SIGQUIT: "QUIT", syscall.SIGSEGV: "SEGV", syscall.SIGTERM: "TERM", syscall.SIGUSR1: "USR1", syscall.SIGUSR2: "USR2", }
Based on what's handled in https://github.com/golang/crypto/blob/master/ssh/session.go#L21
Functions ¶
func ConfigureSSHClient ¶
func ConfigureSSHClient(privateKeyPath string) (*ssh.ClientConfig, error)
func ConfigureSSHServer ¶
Types ¶
type Agent ¶
type Agent struct {
PluginPaths []string
Listen net.Listener
Name string
Version string
Port int
Registration struct {
URL string
Interval int
ShieldCACert string
SkipVerify bool
}
// contains filtered or unexported fields
}
func (*Agent) ReadConfig ¶
func (*Agent) ResolvePathsIn ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config *ssh.ClientConfig) *Client
type Command ¶
type Command struct {
Op string `json:"operation"`
TargetPlugin string `json:"target_plugin,omitempty"`
TargetEndpoint string `json:"target_endpoint,omitempty"`
StorePlugin string `json:"store_plugin,omitempty"`
StoreEndpoint string `json:"store_endpoint,omitempty"`
RestoreKey string `json:"restore_key,omitempty"`
EncryptType string `json:"encrypt_type,omitempty"`
EncryptKey string `json:"encrypt_key,omitempty"`
EncryptIV string `json:"encrypt_iv,omitempty"`
Compression string `json:"compression,omitempty"`
}
func ParseCommand ¶
type Config ¶
type Config struct {
Name string `yaml:"name"`
AuthorizedKeysFile string `yaml:"authorized_keys_file"`
HostKeyFile string `yaml:"host_key_file"`
ListenAddress string `yaml:"listen_address"`
PluginPaths []string `yaml:"plugin_paths"`
Registration struct {
URL string `yaml:"url"`
Interval int `yaml:"interval"`
ShieldCACert string `yaml:"shield_ca_cert"`
SkipVerify bool `yaml:"skip_verify"`
} `yaml:"registration"`
}
Click to show internal directories.
Click to hide internal directories.