Hello beginners@perl.org,

I just install Net::SFTP on my machine via PPM (randy kobes
repository),  and ran this code:

#!/usr/bin/perl -w
use strict;
use warnings;
use Net::SFTP;

my $host = '11.11.111.11';
my $user = 'root';
my $pass = '*********';

my $sftp = Net::SFTP->new($host,user    =>$user,
                                password=>$pass,
                                debug   =>1,
                                ssh_args=>[port=>22] ) || die "Can't connect 
[EMAIL PROTECTED]";
print "Connected\n";

__END__

gives me strange output:

branog: Reading configuration data /.ssh/config
branog: Reading configuration data /etc/ssh_config
branog: Connecting to 66.98.212.99, port 22.
branog: Remote protocol version 1.99, remote software version OpenSSH_3.9p1
branog: Net::SSH::Perl Version 1.25, protocol version 2.0.
Use of uninitialized value in concatenation (.) or string at D:/Perl/site/lib/Ne
t/SSH/Perl/SSH2.pm line 41, <GEN0> line 1.
Use of uninitialized value in concatenation (.) or string at D:/Perl/site/lib/Ne
t/SSH/Perl/SSH2.pm line 47, <GEN0> line 1.
branog: No compat match: OpenSSH_3.9p1.
Your vendor has not defined Fcntl macro F_SETFL, used at D:/Perl/site/lib/Net/SS
H/Perl.pm line 214.

it seems, I don't have /.ssh/config nor /etc/ssh_config, but I don't
think this is causing error. Line 41 from SSH2 is:
$ssh->{config}->set('identity_files', [ "$ENV{HOME}/.ssh/id_dsa" ]);

si I put infront on my script:
$ENV{HOME} = '';

now, I don't get 'Use of uninitaialized value...' errors, but last
error still remain.

line 214 from Perl.pm is:
    fcntl($sock, F_SETFL, O_NONBLOCK)
        or die "Can't set socket non-blocking: $!";

but this I really don't know how to cheat it...

Also, when I think about this, main errors are these:
branog: Remote protocol version 1.99, remote software version OpenSSH_3.9p1
branog: No compat match: OpenSSH_3.9p1.

so it seems, local SSH can't comunicate with remote version of SSH
(I'm right?). Where I can find list of supported SSH versions (so I
should add this one:)

--

 --. ,--  ,-     ICQ: 7552083      \|||/    `//EB: www.2ge.us
,--' |  - |--    IRC: [2ge]        (. .)    ,\\SN: 2ge!2ge_us
`====+==+=+===~  ~=============-o00-(_)-00o-================~
* <- Tribble  (*) <- Tribble with shields up
 




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to