Subject: | Host Keys not working in Net::OpenSSH 0.40 |
Date: | Sun, 15 Nov 2009 11:52:21 +1100 |
To: | bug-Net-OpenSSH [...] rt.cpan.org |
From: | Dan McGarry <dmcgarry [...] imagicity.com> |
I've been writing a small applet that uses SSH::RPC::Client to connect
to a number of remote servers and monitor their status. The application
works without issue using version 0.39 of Net::OpenSSH, but fails to
connect to any of the remote hosts when using version 0.40.
The connections are all enabled via password-less ssh keys bound to a
single command on the remote server.
The error message returned is related to authentication failure e.g.:
Permission denied (publickey,password).
Reverting to version 0.39 is a viable work-around.
I suspect that the following change has something to do with the problem:
--- /usr/local/share/perl/5.10.0/Net/OpenSSH.pm 2009-10-10
19:03:53.000000000 +1100
+++ /tmp/OpenSSH.pm 2009-11-15 11:31:01.000000000 +1100
@@ -1,6 +1,6 @@
package Net::OpenSSH;
-our $VERSION = '0.39';
+our $VERSION = '0.40';
use strict;
use warnings;
@@ -434,13 +434,17 @@
my ($self, $async) = @_;
$self->_set_error;
+ my @master_opts = (@{$self->{_master_opts}}, '-xMN');
+
my $mpty;
if (defined $self->{_passwd}) {
_load_module('IO::Pty');
$self->{_mpty} = $mpty = IO::Pty->new;
+ push @master_opts, (-o => 'NumberOfPasswordPrompts=1',
+ -o => 'PreferredAuthentications=password');
}
- my @call = $self->_make_call([@{$self->{_master_opts}}, '-xMN']);
+ my @call = $self->_make_call(\@master_opts);
Show quoted text
-------------- SNIPPED --------------------------------
I suspect that the 'PreferredAuthentications=password' is being
construed somehow to mean 'use only passwords', meaning that ssh keys
are not used.
(I'm basing this assumption mostly on the fact that it's the only
remotely plausible change that I can see, not on any significant amount
of testing beyond 'works in 0.39, but not in 0.40'.)
--
Dan McGarry dmcgarry@imagicity.com
Photography: http://www.imagicity.com/
Writing: http://scriptorum.imagicity.com/