Secure FTP in Python?

D

d z e k y l

Hello,

I'd like to write a small backup utility in Python, which would take
advantage of Secure FTP to upload backup archives. Is there a library
implementing SFTP in Python (something like ftplib)? Or is there some other
(noncomplicated) way how secure uploading can be implemented in Python?

Thank you for advice,
Michal
 
B

Behrang Dadsetan

d said:
Hello,

I'd like to write a small backup utility in Python, which would take
advantage of Secure FTP to upload backup archives. Is there a library
implementing SFTP in Python (something like ftplib)? Or is there some other
(noncomplicated) way how secure uploading can be implemented in Python?

Thank you for advice,
Michal
I just read a posting about a new library building a secure tunnel for
whatever protocol you want. Or at least that is how I understood it
without looking into it at all :)

So try looking if you can not use stunnel at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/213238
+
ftplib

Regards, Ben.
 
K

Kyler Laird

d z e k y l said:
Or is there some other
(noncomplicated) way how secure uploading can be implemented in Python?

About anything is less needlessly complicated than FTP.
SSH is often the obvious choice, but WebDAV can also
run over SSL.

--kyler
 
C

Cameron Laird

About anything is less needlessly complicated than FTP.
SSH is often the obvious choice, but WebDAV can also
run over SSL.

--kyler

rsync, in particular, is a good fit for what many people
mean by "uploading", and rsync is ssh-savvy.
 
K

Karl Scalet

Cameron said:
rsync, in particular, is a good fit for what many people
mean by "uploading", and rsync is ssh-savvy.

or, on top of rsync-libs, you can run duplicity.
Written in Python :) and does encryption also
of the backup-store using GPG.
Interesting especially if
other people have root access on the backup-server.
The transfer intself can be done in plain ftp or
ssh/scp.

http://www.nongnu.org/duplicity/

Maybe too far from what OP actually is interested in.

Karl
 
?

=?ISO-8859-1?Q?Gerhard_H=E4ring?=

Karl said:
Cameron said:
rsync, in particular, is a good fit for what many people
mean by "uploading", and rsync is ssh-savvy.

or, on top of rsync-libs, you can run duplicity. [...]

Or just use the plain librsync wrapper for Python.

Another option that I use to use SSH tunnels.

<OT>
For some reason the people who contributed the ODBC driver to PostgreSQL
found it necessary to reimplement the PostgreSQL wire protocol instead
of linking to libpq, which would already be SSL enabled. Instead of
buying a commercial SSL-enabled PostgreSQL ODBC driver I decided to just
set up a SSH tunnel to my PostgreSQL server for ODBC access.
</OT>

To tunnel FTP over SSH you'll have to use passive FTP.

I don't remember if it has been mentioned already, but M2Crypto has a
FTP/SSL implementation.

-- Gerhard
 
J

JanC

d z e k y l said:
I'd like to write a small backup utility in Python, which would take
advantage of Secure FTP to upload backup archives. Is there a library
implementing SFTP in Python (something like ftplib)? Or is there some
other (noncomplicated) way how secure uploading can be implemented in
Python?

You can do that using pycurl.
<http://pycurl.sourceforge.net/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top