in reply to Re: net::ssh::perl Wrong key type
in thread net::ssh::perl Wrong key type
Thank you for the pointer, unfortunatelly it does not work.
I've seen that on other modules like Net::SSH2, auth_publickey expects the path for both public and private keys.
It appears not to be the case with Net::SSH::Perl. Adding the public key does not change the outcome:
my %params = ( "protocol" => '2', "use_pty" => 0, "options" => ["stricthostkeychecking no"], "identity_files" => ["client_key","client_key.pub"], "debug" => 1, ); $ssh = Net::SSH::Perl->new($server, %params);# debug=>1, identity_file +s=>\@KEYFILE); $ssh->login();
localhost: Authentication methods that can continue: publickey,passwor +d,keyboard-interactive. localhost: Next method to try is publickey. localhost: Trying pubkey authentication with key file 'client_key' Wrong key type at C:/Strawberry/perl/site/lib/Net/SSH/Perl/Auth/Public +Key.pm line 83.
If I try having the public key in the first place it just fails and tries the next one:
localhost: Next method to try is publickey. localhost: Trying pubkey authentication with key file 'client_key.pub' Use of uninitialized value $object in substitution (s///) at C:/Strawb +erry/perl/site/lib/Net/SSH/Perl/Key.pm line 109. Use of uninitialized value $object in substitution (s///) at C:/Strawb +erry/perl/site/lib/Net/SSH/Perl/Key.pm line 109. localhost: Will not query passphrase for 'client_key.pub' in batch mod +e. Use of uninitialized value $object in substitution (s///) at C:/Strawb +erry/perl/site/lib/Net/SSH/Perl/Key.pm line 109. Use of uninitialized value $object in substitution (s///) at C:/Strawb +erry/perl/site/lib/Net/SSH/Perl/Key.pm line 109. localhost: Loading private key failed. localhost: Trying pubkey authentication with key file 'client_key' Wrong key type at C:/Strawberry/perl/site/lib/Net/SSH/Perl/Auth/Public +Key.pm line 83.
I'm going to try all the key formats I manage to generate to check if there any issue there, since I don't know what else might be causing the problem.
Regards.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: net::ssh::perl Wrong key type
by jpsaraiva (Acolyte) on Aug 23, 2019 at 11:40 UTC |