We have a product manager who wants us to push a report file to a customer every week. We told him we could do it with "FTP" to either our internal FTP server or to a FTP service at the customers site.

He went out and with great effort got the IT guys at the customer site to provide us with ... a SFTP account.

("FTP", "SFTP", what's the difference?) ... grrrr

Several months ago my boss (a decent guy) tried to install Net::SFTP and ran into all the dependencies that make it a pain to install. After a lost day of productivity, he does not want to try again.

So I am stuck in the middle.

I pray for guidence. How can I get SFTP to work from a Perl script under Linux WITHOUT installing Net::SFTP?

Yes, if I setup a trust-key relationship it would be a simple system call to run "sftp file_name name@server:" - but there is no way the customer would do that.

(Their IT guys had a fit because we put the date into the report file-name and they prefer to limit the account to 1 or 2 fixed file names. - Paranoid but I respect them for that.)

Someone suggested I use Expect::Simple as a wrapper around the sftp progam to feed in the password. Has anyone done this?

In reply to SFTP and the Pointy-Haired manager by FatDog

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.