Tools.send2server.S2S

S2S (Send 2 Server) is designed for use with a public ssh key.

Usage

Source

Tools.send2server.S2S(
    username=None,
    server_address=None,
    dest_path=None,
    remote=True,
    comp_filename="",
    zip_path=None,
    compressed=True,
    auto=False
)

Methods

Name Description
__init__()
cpto() Send a file.
scpto() Send the file safely.
to_zip() Zip a folder.

__init__()

Usage

Source

__init__(
    username=None,
    server_address=None,
    dest_path=None,
    remote=True,
    comp_filename="",
    zip_path=None,
    compressed=True,
    auto=False
)
Parameters
(string): username

Remote server username.

zip_path=None

This is the absolute path of the directory (or file) to be zipped.

(bool): auto
Flag for automatically carrying out compression and SCP file sending.

cpto()

Send a file.

Usage

Source

cpto(file)
Parameters
file

scpto()

Send the file safely.

Usage

Source

scpto(file)
Parameters
file

to_zip()

Zip a folder.

Usage

Source

to_zip()