Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Addr() string
- func (c *Client) Close() error
- func (c *Client) Hostname() string
- func (c *Client) Model() string
- func (c *Client) OS() string
- func (c *Client) Run(cmds ...string) ([]byte, error)
- func (c *Client) String() string
- func (c *Client) Vendor() string
- func (c *Client) Version() string
Constants ¶
This section is empty.
Variables ¶
View Source
var Timeout = time.Duration(0)
Timeout is the duration to wait for an SSH connection to establish.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents an SSH client for a network device.
func Dial ¶
func Dial(host, port string, clientCfg *ssh.ClientConfig) (*Client, error)
Dial establishes an SSH client connection to a remote host.
func (*Client) Run ¶
Run creates a new SSH session, starts a remote shell, and runs the specified commands on the remote host.
Click to show internal directories.
Click to hide internal directories.