Documentation
¶
Overview ¶
copied from: https://github.com/bramvdbogaerde/go-scp * Copyright (c) 2018 Bram Vandenbogaerde * You may use, distribute or modify this code under the * terms of the Mozilla Public License 2.0, which is distributed * along with the source code.
Index ¶
- type Client
- func (a *Client) Close()
- func (a *Client) Connect() error
- func (a *Client) Copy(r io.Reader, remotePath string, permissions string, size int64) error
- func (a *Client) CopyFile(fileReader io.Reader, remotePath string, permissions string) error
- func (a *Client) CopyFromFile(file os.File, remotePath string, permissions string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// the host to connect to
Host string
// the client config to use
ClientConfig *ssh.ClientConfig
// stores the SSH session while the connection is running
Session *ssh.Session
// stores the SSH connection itself in order to close it after transfer
Conn ssh.Conn
// the clients waits for the given timeout until given up the connection
Timeout time.Duration
// the absolute path to the remote SCP binary
RemoteBinary string
}
func (*Client) Connect ¶
Connects to the remote SSH server, returns error if it couldn't establish a session to the SSH server
Click to show internal directories.
Click to hide internal directories.