in reply to
>Windows filename troubles with Net::SSH2
If I understand correctly, the SSH server is running on Windows and the transfer script (which is running on Linux) obtains the file from the Windows machine using scp_get().
This could mean that the problem is with the SSH server on the Windows machine, and nothing to do with perl at all.
A small example script that demonstrates the problem might help.
I couldn't find any such problem when using a Net::SSH2 script (run on my Windows machine) to scp_put() the file onto my Linux machine. I ran this:
## scp.pl ##
die "Usage: perl scp.pl username password"
unless @ARGV == 2;
my $host = '192.168.0.101';
my $user = $ARGV;
my $password = $ARGV;
my $ssh2 = Net::SSH2->new();
print "\nconnecting to $host...\n";
$ssh2->connect($host) or die $ssh2->error;
print "\nauth to $host...\n";
$ssh2->auth_password($user,$password) or die $ssh2->error;
printf "Auth OK: %s\n", $ssh2->auth_ok;
print "scp put\n";
my $ret = $ssh2->scp_put("rub'bish.txt",
print "ret: $ret\n";
It transferred rub'bish.txt
from the windows machine to the Linux machine just fine.
Unfortunately my Windows machine doesn't have an SSH server so I can't try doing it the "other" way.