Subject: | password autentication broken connecting to suse servers |
The recent flag to prefer authentications breaks password authentication to SuSE. The reason
for this is that 'password' is not an authentication method in their list. The attached patch
fixes this by also trying keyboard-interactive after password. All of my SuSE environments
are straight out of the box installs without modification.
$>ssh -v -o StrictHostKeyChecking=no -o NumberOfPasswordPrompts=1 -o
PreferredAuthentications=password root@<target_ip>
OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh_config
...
debug1: Connection established.
...
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.0
debug1: match: OpenSSH_5.0 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
...
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).
$>
Subject: | suse.patch |
diff --git a/OpenSSH.pm b/OpenSSH.pm
index e2da06c..efa49ee 100644
--- a/OpenSSH.pm
+++ b/OpenSSH.pm
@@ -441,7 +441,7 @@ sub _connect {
_load_module('IO::Pty');
$self->{_mpty} = $mpty = IO::Pty->new;
push @master_opts, (-o => 'NumberOfPasswordPrompts=1',
- -o => 'PreferredAuthentications=password');
+ -o => 'PreferredAuthentications=password,keyboard-interactive');
}
my @call = $self->_make_call(\@master_opts);