Secure FTP in Python?

Discussion in 'Python' started by d z e k y l, Jul 31, 2003.

  1. d z e k y l

    d z e k y l Guest

    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
     
    d z e k y l, Jul 31, 2003
    #1
    1. Advertising

  2. 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/Cookbook/Python/Recipe/213238
    +
    ftplib

    Regards, Ben.
     
    Behrang Dadsetan, Jul 31, 2003
    #2
    1. Advertising

  3. d z e k y l

    Kyler Laird Guest

    "d z e k y l" <> 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
     
    Kyler Laird, Aug 1, 2003
    #3
  4. In article <>,
    Kyler Laird <> wrote:
    >"d z e k y l" <> 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 <>
    Business: http://www.Phaseit.net
    Personal: http://phaseit.net/claird/home.html
     
    Cameron Laird, Aug 1, 2003
    #4
  5. d z e k y l

    Karl Scalet Guest

    Cameron Laird schrieb:
    > In article <>,
    > Kyler Laird <> wrote:
    >
    >>"d z e k y l" <> 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
     
    Karl Scalet, Aug 1, 2003
    #5
  6. Karl Scalet wrote:
    > Cameron Laird schrieb:
    >> Kyler Laird <> 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
     
    =?ISO-8859-1?Q?Gerhard_H=E4ring?=, Aug 1, 2003
    #6
  7. d z e k y l

    JanC Guest

    "d z e k y l" <> 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
     
    JanC, Aug 3, 2003
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. A.M
    Replies:
    5
    Views:
    5,445
    Teemu Keiski
    Jun 8, 2004
  2. Daniel Malcolm
    Replies:
    0
    Views:
    556
    Daniel Malcolm
    Jan 24, 2005
  3. zdrakec
    Replies:
    1
    Views:
    436
    zdrakec
    Jul 25, 2005
  4. Joe
    Replies:
    5
    Views:
    960
    Steven Cheng[MSFT]
    Dec 13, 2005
  5. D. Buck
    Replies:
    2
    Views:
    489
    D. Buck
    Jun 29, 2004
Loading...

Share This Page