Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install sftpserver

How to install sftpserver

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install sftpserver
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.2 Available View build log
Windows (64-bit)
0.2 Available View build log
Mac OS X (10.5+)
0.2 Available View build log
Linux (32-bit)
0.2 Available View build log
Linux (64-bit)
0.2 Available View build log
 
Author
License
MIT
Dependencies
Depended by
Imports
Lastest release
version 0.2 on Dec 12th, 2011

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

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']

Subscribe to package updates

Last updated Dec 12th, 2011

Download Stats

Last month:2

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.