Net::SFTP::Foreign (...) does require an SSH client of some sort. What client would that probably be and how would I interface with it?
If the box running your script has Linux or some other Unix installed, Net::SFTP::Foreign will just use the SSH client in your system (as long as it is named ssh and is in the PATH). You can also install OpenSSH in a custom location and tell the module to use it with the ssh_cmd option. As it seems that you are using password authentication you will also have to install Expect.
If you want to run the script under Windows, your best option may probably be to use the Net::SSH2 backend Net::SFTP::Foreign::Backend::Net_SSH2. The default backend does not support password authentication under Windows because of Expect not working there. Alternatively, you could use plink (read the FAQ section from the module documentation for the details).
Examples of how to connect to a remote server are included in the docs. Usually, this will do:
my $sftp = Net::SFTP::Foreign->new($host, user => $user, passwd => $pa
$sftp->error and die "SFTP connection failed: " . $sftp->error;
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.