Net::SFTP::Foreign requires SFTP to be working (or allowed) on the remote server.
If all you are allowed to do is to scp there, then you can try Net::SSH2, Net::SSH::Perl or Net::SCP, though, as you are using keys for authentication, probably just calling the scp (or pscp) program from Perl would be the simplest solution.
Also, take into account that scp is very limiting and will allow you to transfer files from one side to the other only. For instance, you will not be able to move files around on the server (update: oh, well, unless they allow you to run any remote command and not just scp in client mode).
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.