O Monks,

I have an open-source app that lets users upload files to a server via ftp, and I would like to allow sftp as well. Assuming I ever have any users :-), they might be naive users, so I want it to be easy to install. I would also like it to run on both Unix and non-Unix systems.

I started off thinking I'd use Net::SFTP, but when I grabbed it via CPAN it was not straightforward. It had lots of dependencies, one of which was Math::Pari. Math::Pari failed a bunch of its tests after compilation, and the tests still hadn't finished after running all night. OK, if it was just me, I might be willing to work on getting it to run, but I can't ask end-users to go through the same process.

I next thought about doing it via a shell. This has the disadvantage that it won't work outside of Unix, but it wouldn't require any extra installation on a Unix machine. The problem I'm running into is that the Unix sftp command-line program always takes the password via a terminal, whereas my app is a Perl/Tk GUI. I want the user to type the password into a dialog box, and then have the uploading start.

Is there any easy way to do all this?

Thanks in advance, O Monks.


In reply to sftp from Perl by bcrowell

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.