A
apersaud
Ok, so I have a script that uses Net::SSH:
erl and Net::SFTP. However
if the filenames to be saved on the remote machine is read from a file
(not set internally in the perl code), it doesn't work.
Example:
use Net::SFTP;
my $sftp = Net::SFTP->new($host, %args);
$val = 'mymachine';
$val2 = `hostname`; #or read from a file on the system
chomp $val2;
$sftp->put('/root/'.$val.'.txt','/root/'.$val.'.txt') # works
$sftp->put('/root/'.$val2.'.txt','/root/'.$val2.'.txt') # FAILS
I get a Wide Character problem with HMAC_SHA1 and no files are copied
over. Anyone has any ideas?
if the filenames to be saved on the remote machine is read from a file
(not set internally in the perl code), it doesn't work.
Example:
use Net::SFTP;
my $sftp = Net::SFTP->new($host, %args);
$val = 'mymachine';
$val2 = `hostname`; #or read from a file on the system
chomp $val2;
$sftp->put('/root/'.$val.'.txt','/root/'.$val.'.txt') # works
$sftp->put('/root/'.$val2.'.txt','/root/'.$val2.'.txt') # FAILS
I get a Wide Character problem with HMAC_SHA1 and no files are copied
over. Anyone has any ideas?