carcassonne has asked for the wisdom of the Perl Monks concerning the following question:

Folks,

This could either be a CPAN module question or a Net::SFTP. I've installed Net::SFTP and at that time I've only chosen protocol 2. Now I need, seemingly (see error msg below) protocol 1. If I do a 'install Net::SFTP' at the CPAN module prompt it'll report that it's up to date. If I add 'force' it'll do a bit of very short work then it'll report OK. How can I go through the installation questions once more so I can choose both 1 and 2 protocols ?

Simply putting a file, using protocol 2, I get:

No compat match: OpenSSH_3.9p1.

When I specify 'protocol +> 1,2' I then get :

Can't locate object method "blocking" via package "IO::Handle" at /usr/lib/perl5/site_perl/5.8.6/Net/SSH/Perl.pm line 212, <GEN0> line 1.

Thanks.

Replies are listed 'Best First'.
Re: SFTP: Installing other protocol
by zentara (Cardinal) on Nov 25, 2005 at 17:34 UTC
    I don't know if this is the answer to your question, but I'll mention it, since you are not showing any code. Are you passing your %args in correctly? There is a awkward way of doing it.
    my %ssh_options = ( StrctHostKeyChecking => "no" ); my %args = ( username => $user, password => $pass, debug => 1, ssh_args => (options => \%ssh_options) ); my $sftp = Net::SFTP->new($host, %args)
    I have seen that same exact error using Net::SSH::Perl , and it is fixed by using "protocol => 2";

    Maybe the server you are connecting to is using protocol 2, but you are not setting the protocol=>2 correctly for SFTP to pick it up?


    I'm not really a human, but I play one on earth. flash japh