Documentation
¶
Index ¶
- func PasswordKeyboardInteractive(password string) ssh.KeyboardInteractiveChallenge
- type Client
- func (c *Client) Close() error
- func (c *Client) CmdOutBytes(cmd string) ([]byte, error)
- func (c *Client) Connect() error
- func (c *Client) FastConnect() error
- func (c *Client) GetprobePasswd() string
- func (c *Client) Init(opts ...Option)
- func (c *Client) LoadConfig(v interface{}) error
- func (c *Client) StartTerminal() error
- func (c *Client) Upload(src, dest string, mode os.FileMode) error
- type Group
- type Option
- func Env(k, v string) Option
- func Hostname(hostname string) Option
- func IP(ip string) Option
- func Key(key string) Option
- func Name(name string) Option
- func Password(password string) Option
- func Passwords(passwords ...string) Option
- func Port(port int) Option
- func Pseudo(pseudo bool) Option
- func QA(key, value string) Option
- func Timeout(timeout int) Option
- func Username(username string) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PasswordKeyboardInteractive ¶
func PasswordKeyboardInteractive(password string) ssh.KeyboardInteractiveChallenge
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client client
func (*Client) CmdOutBytes ¶
CmdOutBytes cmd out bytes
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func WithContext ¶
func WithContext() *Group
type Options ¶
type Options struct { Name string `json:"name" yaml:"name"` Hotname string `json:"hostname" yaml:"hostname"` IP string `json:"ip" yaml:"ip"` Port int `json:"port" yaml:"port"` Username string `json:"username" yaml:"username"` Password string `json:"password" yaml:"password"` Passwords []string `json:"passwords" yaml:"passwords"` Key string `json:"key" yaml:"key"` QAs map[string]string `json:"qas" yaml:"qas"` Pseudo bool `json:"pseudo" yaml:"pseudo"` // like "ssh -tt", Force pseudo-terminal allocation. Timeout int `json:"timeout" yaml:"timeout"` Env map[string]string `json:"env" yaml:"env"` }
Options options
Click to show internal directories.
Click to hide internal directories.