471,305 Members | 1,467 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,305 software developers and data experts.

Secure FTP in Python?

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
Jul 18 '05 #1
6 6513
d z e k y l wrote:
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/Coo.../Recipe/213238
+
ftplib

Regards, Ben.

Jul 18 '05 #2
"d z e k y l" <no@nospam.no> writes:
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
Jul 18 '05 #3
In article <js***********@jowls.lairds.org>,
Kyler Laird <Ky***@news.Lairds.org> wrote:
"d z e k y l" <no@nospam.no> writes:
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


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

Cameron Laird <Ca*****@Lairds.com>
Business: http://www.Phaseit.net
Personal: http://phaseit.net/claird/home.html
Jul 18 '05 #4
Cameron Laird schrieb:
In article <js***********@jowls.lairds.org>,
Kyler Laird <Ky***@news.Lairds.org> wrote:
"d z e k y l" <no@nospam.no> writes:

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

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

Jul 18 '05 #5
Karl Scalet wrote:
Cameron Laird schrieb:
Kyler Laird <Ky***@news.Lairds.org> wrote:
Or is there some other
(noncomplicated) way how secure uploading can be implemented in Python?


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

Jul 18 '05 #6
"d z e k y l" <no@nospam.no> schreef:
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/>

--
JanC

"Be strict when sending and tolerant when receiving."
RFC 1958 - Architectural Principles of the Internet - section 3.9
Jul 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by PiedmontBiz | last post: by
2 posts views Thread by Calvin | last post: by
21 posts views Thread by Boris Genc | last post: by
6 posts views Thread by andrew blah | last post: by
1 post views Thread by jiba | last post: by
7 posts views Thread by Laszlo Nagy | last post: by
8 posts views Thread by Daniel Crespo | last post: by
31 posts views Thread by Fredrik Tolf | last post: by
5 posts views Thread by walterbyrd | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.