Documentation ¶
Index ¶
- type SSHClient
- func (c *SSHClient) Close() error
- func (c *SSHClient) PushBytes(b []byte, dest, perms string) error
- func (c *SSHClient) PushDir(src string, dest string, preserve bool) error
- func (c *SSHClient) PushFile(src, dest string, preserve bool) error
- func (c *SSHClient) Receive(src, dest string) error
- func (c *SSHClient) RunCmd(command string) (string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSHClient ¶
type SSHClient struct {
// contains filtered or unexported fields
}
func NewSSHClient ¶
NewSSHClient returns a new SSHClient object. hostport should be in format server.name:22 password is optional. it is tried instead of keys if not blank
func (*SSHClient) PushBytes ¶
PushBytes is used to push bytes from memory without writing a file first. dest should be the full remote path, and perms a typical permission string - eg "0644"
func (*SSHClient) PushDir ¶
PushDir sends local folder src to remote host to folder dest. If preserve is set, timestamps are kept.
func (*SSHClient) PushFile ¶
PushFile sends local file src to remote host to file/folder dest. If preserve is set, timestamps are preserved.
Click to show internal directories.
Click to hide internal directories.