Documentation ¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) Copy(src, dst string, force bool) error
- func (c *Client) CopyID(pubKey ...string) error
- func (c *Client) CopyKey(keyPath []string) error
- func (c *Client) GetClient() *ssh.Client
- func (c *Client) Interact() error
- func (c *Client) RawInteract() error
- func (c *Client) RawRsync(src, dst string) error
- func (c *Client) RawSCP(src, dst string) error
- func (c *Client) RunDirect(script string, stdout, stderr io.Writer) error
- func (c *Client) RunResult(script string) (string, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client ...
func (*Client) Copy ¶
Copy ... /tmp/1.txt -> /root/ = /root/1.txt /tmp/dir/ -> /root/ = /tmp/1.txt /tmp/dir/ -> /root/dir/ = /tmp/dir/1.txx
func (*Client) CopyID ¶ added in v0.2.4
CopyID copy public key to remote instance authorized_keys file
func (*Client) CopyKey ¶ added in v0.2.4
CopyKey to copy private or public key to remote instance keyPath is like ~/.ssh/id_rsa.pub
func (*Client) RawInteract ¶ added in v0.2.1
RawInteract interact with ssh command
func (*Client) RawRsync ¶ added in v0.2.2
RawRsync ... rsync -azv -e 'ssh -o "ProxyCommand ssh -A PROXYHOST -W %h:%p"' foo/ dest:./foo/
type Option ¶
func WithJumpProxy ¶
WithJumpProxy ...
Click to show internal directories.
Click to hide internal directories.