eoan, libssh2 1.8.0-2.1build1: postponed key auth error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libssh2 (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
* My system
-------
$ lsb_release -rd
Description: Ubuntu 19.10
Release: 19.10
-------
* Package version
-------
$ apt-cache policy libssh2-1
libssh2-1:
Installed: 1.8.0-2.1build1
Candidate: 1.8.0-2.1build1
Version table:
*** 1.8.0-2.1build1 500
500 http://
100 /var/lib/
-------
* Expected behaviour
'php-ssh2' that depends on 'libssh2' authenticates with public key successfully with OpenSSH server.
* Actual behaviour
'php-ssh2' fails to authenticate with OpenSSH server using RSA public key. When used with manually compiled 'libssh2' with OpenSSL, authentication works fine.
* Problem description
I found that when 'php-ssh2' is used with 'libssh2 1.8.0-2.1build1' it fails to authenticate with an OpenSSH server.
Here's my test code:
-------
<?php
$ssh_connection = ssh2_connect(
ssh2_auth_
?>
-------
When I try to run the code, it exists with the following error:
-------
PHP Warning: ssh2_auth_
-------
The error I see in the sshd logs is the following:
-------
апр 26 11:38:43 desktop sshd[12466]: debug1: no match: libssh2_1.8.0 PHP
[...]
апр 26 11:38:44 desktop sshd[12466]: debug3: mm_answer_
апр 26 11:38:44 desktop sshd[12466]: debug3: mm_request_send entering: type 23
апр 26 11:38:44 desktop sshd[12466]: debug3: send packet: type 60 [preauth]
апр 26 11:38:44 desktop sshd[12466]: debug2: userauth_pubkey: authenticated 0 pkalg ssh-ed25519 [preauth]
апр 26 11:38:44 desktop sshd[12466]: debug3: user_specific_
апр 26 11:38:44 desktop sshd[12466]: debug3: ensure_
апр 26 11:38:44 desktop sshd[12466]: Postponed publickey for avp from 127.0.0.1 port 39858 ssh2 [preauth]
апр 26 11:38:44 desktop sshd[12466]: debug3: receive packet: type 1 [preauth]
апр 26 11:38:44 desktop sshd[12466]: Received disconnect from 127.0.0.1 port 39858:11: PECL/ssh2 (http://
-------
To trace down the error, I downloaded 'php-ssh2' sources, added some debug traces, built it and tried to run my test code again. It turns out that 'libssh2_
After some investigation I tried to build different versions of 'libssh2' from sources. It turned out that when I build 'libssh' version 1.9.0 with OpenSSH, the errors are gone:
-------
$ git clone https:/
$ cd libssh2
$ git checkout libssh2-1.9.0
$ mkdir build
$ cd build
$ cmake -DBUILD_
$ make -j4
-------
On the other hand, when I build 'libssh2' versions 1.8.0, 1.8.1, 1.8.2 from sources with OpenSSL, I see the "Postponed publickey" error again.
Furthermore, if I try to use 1.9.0 with Libgcrypt, I see the error too.
My conclusion is that 'php-ssh2' in Ubuntu 19.10 does not work properly with the default packaged version of 'libssh2' (and probably other packages that depend on 'libssh2' as well.)
If I missed something, please feel free to correct me.
Thanks.
description: | updated |
Hi,
Do you still see this issue in supported series, e.g. Focal (20.04) ?