scp client, for use with paramiko.
Project description
A library that implements the client side of the scp (Secure Copy) protocol. It is designed to be used with paramiko (http://www.lag.net/paramiko/).
Writing files
Example:
with closing(Write(ssh_client.get_transport(), '.')) as scp: scp.send_file('file.txt', True) scp.send_file('../../test.log', remote_filename='baz.log') s = StringIO('this is a test') scp.send(s, 'test', '0601', len(s.getvalue()))
Writing directories
Example:
with closing(WriteDir(ssh_client.get_transport(), 'subdir')) as scp: scp.send_dir('../../manuals', preserve_times=True, progress=progress)
Reading files
Example:
with closing(ReadDir(ssh_client.get_transport(), '.')) as scp: scp.receive_dir('foo', preserve_times=True)
Reading directories
Example:
with closing(Read(ssh_client.get_transport(), '.')) as scp: scp.receive('file.txt')
Change log
0.2 2011-10-31 Eric V. Smith
Removed useless tests.
Fixed embarassing last minute typo which broke the code.
Included trivial examples in README.txt. Needs much work.
Forbid files that contain ‘..’ in the filename. This is an attempt to prevent path traversal. This approach is simplistic, but it’s a reasonable first step and gets the job done.
0.1 2011-10-31 Eric V. Smith
Initial release.
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
scpclient-0.2.tar.gz
(9.5 kB
view details)
File details
Details for the file scpclient-0.2.tar.gz
.
File metadata
- Download URL: scpclient-0.2.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d0e185094f605e62e6ba2bbfd250c0b3ded7a7192a71ae0af07c7972e1176e3 |
|
MD5 | 9ff3752b50ae762cd8e9dcb22e7be34c |
|
BLAKE2b-256 | 310d05cb23e3d7dfd12990d0bdaea39aded66fbdd7e3fd561dd6d9905433285c |