Subject: | Password authentication failing in version 0.76 |
We have some automation that will attempt to setup passwordless SSH using Net:OpenSSH where the password is retrieved from and encrypted store and passed to the ssh client using the password parameter. After installing a fresh instance I was unable to authenticate, getting the following error after the MOTD is displayed:
Couldn't establish SSH connection: unable to establish master SSH connection: password authentication failed
After rolling back to 0.74, this problem went away.
Something has changed in the password authentication routines where password=>$password is supplied to the Net::OpenSSH object.
0.74: PASS
0.76: FAIL
Example code:
my $ssh = Net::OpenSSH->new(
$host,
user => $user,
password => $password,
);
$ssh->error and
die "Couldn't establish SSH connection: ". $ssh->error;
my ($out, $err) = $ssh->capture2("uptime");
$ssh->error and
die "remote find command failed: " . $ssh->error;
carp $out;