Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: Can't get $ssh2->check_hostkey to work

by salva (Canon)
on Aug 11, 2018 at 23:53 UTC ( [id://1220263]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Can't get $ssh2->check_hostkey to work
in thread Can't get $ssh2->check_hostkey to work

The SSH protocol provides two authentication methods, password and keyboard-interactive, accepting a user/password pair. They look the same to the user but under the hood are quite different and not interchangeable.

In your particular case, the server is accepting k-i,and you are trying to authenticate using password authentication.

  • Comment on Re^4: Can't get $ssh2->check_hostkey to work

Replies are listed 'Best First'.
Re^5: Can't get $ssh2->check_hostkey to work
by pryrt (Abbot) on Aug 15, 2018 at 14:14 UTC

    salva, I'm not BernieC, but when answering in another thread, I saw something, in this simplified SSCCE:

    #!/usr/bin/env perl # abbreviated version of https://perlmonks.org/?node_id=1220377 use warnings; use strict; use Net::SSH2 ':all'; use Config; print STDERR "\n__DATA__\n\n"; print STDERR "\$] => $]\n"; print STDERR "$_ => $Config{$_}\n" for qw/archname osname osvers/; print STDERR "\n\nshell02.theworld.com:\n"; my $ssh2 = Net::SSH2->new(); my $rv = $ssh2->connect('shell02.theworld.com') or $ssh2->die_with_err +or; $rv = $ssh2->auth_list() or $ssh2->die_with_error; + print STDERR "\tauth_list => $rv\n"; $rv = $ssh2->auth_password_interact('dummyuser') or $ssh2->die_with_er +ror; print STDERR "\tauth_password_interact +=> $rv\n"; # this wouldn't work on my strawberry perl: "Non-blocking ReadLine + is not supported on this architecture" __DATA__ $] => 5.026002 archname => MSWin32-x64-multi-thread osname => MSWin32 osvers => 10.0.16299.371 shell02.theworld.com: auth_list => publickey,keyboard-interactive dummyuser's password? Non-blocking ReadLine is not supported on this a +rchitecture at C:/usr/local/apps/berrybrew/perls/5.26.2_64_PDL/perl/v +endor/lib/Net/SSH2.pm line 314.

    Do you know of a way to get auth_password_interact() to work with Strawberry Perl's version of ReadLine?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1220263]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-23 23:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found