Secure FTP in Python?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • d z e k y l

    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


  • Behrang Dadsetan

    #2
    Re: Secure FTP in Python?

    d z e k y l wrote:[color=blue]
    > 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
    >
    >[/color]
    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

    +
    ftplib

    Regards, Ben.

    Comment

    • Kyler Laird

      #3
      Re: Secure FTP in Python?

      "d z e k y l" <[email protected] > writes:
      [color=blue]
      >Or is there some other
      >(noncomplicate d) way how secure uploading can be implemented in Python?[/color]

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

      --kyler

      Comment

      • Cameron Laird

        #4
        Re: Secure FTP in Python?

        In article <[email protected] airds.org>,
        Kyler Laird <[email protected] rds.org> wrote:[color=blue]
        >"d z e k y l" <[email protected] > writes:
        >[color=green]
        >>Or is there some other
        >>(noncomplicat ed) way how secure uploading can be implemented in Python?[/color]
        >
        >About anything is less needlessly complicated than FTP.
        >SSH is often the obvious choice, but WebDAV can also
        >run over SSL.
        >
        >--kyler[/color]

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

        Cameron Laird <Cameron@Lairds .com>
        Business: http://www.Phaseit.net
        Personal: http://phaseit.net/claird/home.html

        Comment

        • Karl Scalet

          #5
          Re: Secure FTP in Python?

          Cameron Laird schrieb:[color=blue]
          > In article <[email protected] airds.org>,
          > Kyler Laird <[email protected] rds.org> wrote:
          >[color=green]
          >>"d z e k y l" <[email protected] > writes:
          >>
          >>[color=darkred]
          >>>Or is there some other
          >>>(noncomplica ted) way how secure uploading can be implemented in Python?[/color]
          >>
          >>About anything is less needlessly complicated than FTP.
          >>SSH is often the obvious choice, but WebDAV can also
          >>run over SSL.
          >>
          >>--kyler[/color]
          >
          >
          > rsync, in particular, is a good fit for what many people
          > mean by "uploading" , and rsync is ssh-savvy.[/color]

          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.



          Maybe too far from what OP actually is interested in.

          Karl

          Comment

          • Gerhard Häring

            #6
            Re: Secure FTP in Python?

            Karl Scalet wrote:[color=blue]
            > Cameron Laird schrieb:[color=green]
            >> Kyler Laird <[email protected] rds.org> wrote:[color=darkred]
            >>>> Or is there some other
            >>>> (noncomplicated ) way how secure uploading can be implemented in Python?[/color]
            >>
            >> rsync, in particular, is a good fit for what many people
            >> mean by "uploading" , and rsync is ssh-savvy.[/color]
            >
            > or, on top of rsync-libs, you can run duplicity. [...][/color]

            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

            Comment

            • JanC

              #7
              Re: Secure FTP in Python?

              "d z e k y l" <[email protected] > schreef:
              [color=blue]
              > 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?[/color]

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

              --
              JanC

              "Be strict when sending and tolerant when receiving."
              RFC 1958 - Architectural Principles of the Internet - section 3.9

              Comment

              Working...