Hey,
Anyone here that have installed Net::SFTP module in perl and actually made it work? I get as far as this:
>perl SFTPTest.pl
slackware: Reading configuration data ~/.ssh/config
slackware: Reading configuration data /etc/ssh_config
slackware: Connecting to localhost, port 21.
slackware: Socket created, turning on blocking...
slackware: Remote protocol version ., remote software version
slackware: Net::SSH::Perl Version 1.23_01, protocol version 2.0.
slackware: No compat match: .
slackware: Connection established.
slackware: Sent key-exchange init (KEXINIT), wait response.
Bad packet length 892350496 at /usr/lib/perl5/site_perl/5.8.x/Net/SSH/Perl/Packet.pm line 175
And I have to "hardcode" stuff like choosing SSH2! But, it would be nice if someone had some fix for this, or even a step-by-step guide how to do it all from scratch. Since perl is so powerfull as it is, I prefer scripting in that instead of bash and tcl.
Also, I'm not sure how to create the damn keys to use. Anyone here that can help me with that too? I _think_ the problem here is/are the key(s)!
Script looks like this:
Code:
#!/usr/bin/perl -w
use Net::SFTP;
use strict;
my $host = "localhost";
my $user = "ace";
my $pass = "temp";
my $port = 21;
my %args = (ssh_args => []);
$args{user} = $user;
$args{password} = $pass;
$args{debug} = 1;
$args{protocol} = '2,1';
push @{ $args{ssh_args} }, port => $port;
my $sftp = Net::SFTP->new($host, %args); Thanks,
Ace