Skip to main content

scp module for paramiko

Project description

Pure python scp module
======================

The scp.py module uses a paramiko transport to send and recieve files via the
scp1 protocol. This is the protocol as referenced from the openssh scp program,
and has only been tested with this implementation.


Example
-------

.. code-block:: python

from paramiko import SSHClient
from scp import SCPClient

ssh = SSHClient()
ssh.load_system_host_keys()
ssh.connect('example.com')

# SCPCLient takes a paramiko transport as its only argument
scp = SCPClient(ssh.get_transport())

scp.put('test.txt', 'test2.txt')
scp.get('test2.txt')

scp.close()


.. code-block::

$ md5sum test.txt test2.txt
fc264c65fb17b7db5237cf7ce1780769 test.txt
fc264c65fb17b7db5237cf7ce1780769 test2.txt

Using 'with' keyword
------------------

.. code-block:: python

from paramiko import SSHClient
from scp import SCPClient

ssh = SSHClient()
ssh.load_system_host_keys()
ssh.connect('example.com')

with SCPClient(ssh.get_transport()) as scp:
scp.put('test.txt', 'test2.txt')
scp.get('test2.txt')


.. code-block::

$ md5sum test.txt test2.txt
fc264c65fb17b7db5237cf7ce1780769 test.txt
fc264c65fb17b7db5237cf7ce1780769 test2.txt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scp-0.10.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distributions

scp-0.10.0-py2.py3-none-any.whl (7.1 kB view details)

Uploaded Python 2 Python 3

scp-0.10.0-py2-none-any.whl (7.1 kB view details)

Uploaded Python 2

File details

Details for the file scp-0.10.0.tar.gz.

File metadata

  • Download URL: scp-0.10.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for scp-0.10.0.tar.gz
Algorithm Hash digest
SHA256 d5c054493d7a55bcc58a02974986d638734f270554b9e7bb7dee7a97cfea432e
MD5 de09a132271d7b9c0353c0b5b10af15a
BLAKE2b-256 a753354e116145b32069523dd66b0f905a92597d1b5d432585763e165e23608a

See more details on using hashes here.

File details

Details for the file scp-0.10.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for scp-0.10.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 75f34c00944caef47758076f5e43b7ae3665bc0bd6edd69740141795b14aef81
MD5 83e4209c41ec65c24ffedbbe8efd5e02
BLAKE2b-256 166f5b595ee470565a705f4b2e0fe358d99456e65da0bf16dcadb5677dcbaa19

See more details on using hashes here.

File details

Details for the file scp-0.10.0-py2-none-any.whl.

File metadata

File hashes

Hashes for scp-0.10.0-py2-none-any.whl
Algorithm Hash digest
SHA256 abcf9288798d241063bb1aaf023bfc7ca29b96614521dd943d6f754853427109
MD5 b341db50f1150a836f4e27a4c787dab2
BLAKE2b-256 a925083fa46ea506c3ffe239109861c6c02c0456a4b2f58368a378ea617fe9a1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page