The following code does not work:
#!/usr/bin/perl -w
use Net::SFTP::Foreign;
my $sftp = Net::SFTP::Foreign->new(
host => 'localhost',
port => 22,
user => 'jorgegv',
password => 'XXXXXXXX',
);
$sftp->error and die "Error en conexión SFTP: " . $sftp->error;
warn('Conexion SFTP correcta');
---------------
[jorgegv@desarrollo3 script]$ perl test-sftp.pl
Error en conexión SFTP: Bad ssh command: Desplazamiento ilegal at test-
sftp.pl line 11.
Installed on Perl 5.14.1.
Version 1.58_07 worked OK.