Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

scp module for paramiko

branch: master

Bump to 0.8.0

scp.py should now work with python 2 and python 3
latest commit 068e952646
James Bardin authored
Octocat-spinner-32 LICENSE.txt move license stanza to LICENSE.txt April 08, 2013
Octocat-spinner-32 MANIFEST.in add MANIFEST.in April 08, 2013
Octocat-spinner-32 README.md Update README.md July 13, 2013
Octocat-spinner-32 scp.py Some changes to make scp work with python 2 and 3 April 08, 2014
Octocat-spinner-32 setup.py Bump to 0.8.0 April 14, 2014
README.md

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

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')
$ md5sum test.xt test2.txt
fc264c65fb17b7db5237cf7ce1780769 test.txt
fc264c65fb17b7db5237cf7ce1780769 test2.txt
Something went wrong with that request. Please try again.