sftpserver
sftpserver is a simple single-threaded SFTP server based on Paramiko’s SFTPServer.
I needed a simple server that could be used as a stub for testing Python SFTP clients so I whipped out one.
Installation
Using pip:
$ [sudo] pip install sftpserver
Examples
$ sftpserver
Usage: sftpserver [options]
-k/--keyfile should be specified
Options:
-h, --help show this help message and exit
--host=HOST listen on HOST [default: localhost]
-p PORT, --port=PORT listen on PORT [default: 3373]
-l LEVEL, --level=LEVEL
Debug level: WARNING, INFO, DEBUG [default: INFO]
-k FILE, --keyfile=FILE
Path to private key, for example /tmp/test_rsa.key
$ sftpserver -k /tmp/test_rsa.key -l DEBUG
Generating a test private key:
$ openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout /tmp/test_rsa.key
Connecting with a Python client to our server:
>>> import paramiko
>>> pkey = paramiko.RSAKey.from_private_key_file('/tmp/test_rsa.key')
>>> transport = paramiko.Transport(('localhost', 3373))
>>> transport.connect(username='admin', password='admin', pkey=pkey)
>>> sftp = paramiko.SFTPClient.from_transport(transport)
>>> sftp.listdir('.')
['loop.py', 'stub_sftp.py']
Metadata
Release files for sftpserver 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sftpserver-0.3.tar.gz | 5.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sftpserver-0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 12.8 kB
Release files / sftpserver-0.3.tar.gz
| Download URL | sftpserver-0.3.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2f068d7715fcb2935d17ab0281c4902ebacce83b35b51889e9886442da0a6fd
|
|
BLAKE2b-256 checksum How to use checksums |
89ef9a211cbba70aa8c2166241205e380944766cbf8b7a2b0e691f8a217445c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / sftpserver-0.3-py2.py3-none-any.whl
| Download URL | sftpserver-0.3-py2.py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
41bdd4674b5b0b5780dab8a758c8e96aede5ab1b5cb958c2a66af6eb129f56fa
|
|
BLAKE2b-256 checksum How to use checksums |
b86dccc7aee2cfc53bd3f93dc5b79e396de8682c562cc20698f3825d232e2995
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sftpserver 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.