Subject: | rput doesn't seem to work on windows using plink/putty |
plink 0.60
I'm having problems getting Net::SFTP::Foreign rput() method to work on
windows. It reports success, creates the remote directory, but no files
are transferred. The rput method returns success and the error() method
always returns no error (0). Here is test code that demonstrates the
problem:
use warnings;
use strict;
use Net::SFTP::Foreign;
my $sftp = Net::SFTP::Foreign->new(
host => '<removed>',
user => '<removed>',
ssh_cmd => 'plink',
);
die $sftp->error if $sftp->error;
$sftp->rput('\Zed', '/home/<removed>/Zed') or die $sftp->error();
my $ls = $sftp->ls('/home/<removed>/Zed') or die $sftp->error();
print $_->{'filename'} . "\n" for @$ls;
$sftp->disconnect();
Output:
.
..
I am transferring from a windows machine to a linux machine. I have
used the exact code (with a changed ssh_cmd) to transfer files from
linux to linux.