php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58494 ssh2_auth_pubkey_file fails to work
Submitted: 2009-01-08 03:48 UTC Modified: 2009-02-08 12:15 UTC
From: steven at salvania dot be Assigned: mikesul (profile)
Status: Closed Package: ssh2 (PECL)
PHP Version: 5_2 CVS-2009-01-08 (dev) OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
10 - 5 = ?
Subscribe to this entry?

 
 [2009-01-08 03:48 UTC] steven at salvania dot be
Description:
------------
The bundled libssh2 in CVS fails to work under Windows.
You can connect, but the function "ssh2_auth_pubkey_file" fails always.

If you use the latest libssh2, you can use this function without a problem.

BTW: your PHP versions are out of date (I'm using 5.2.8).

Reproduce code:
---------------
<?php
$connection = ssh2_connect('shell.example.com', 22, array('hostkey'=>'ssh-rsa'));

if (ssh2_auth_pubkey_file($connection, 'username',
                          '/home/username/.ssh/id_rsa.pub',
                          '/home/username/.ssh/id_rsa', 'secret')) {
  echo "Public Key Authentication Successful\n";
} else {
  die('Public Key Authentication Failed');
}
?>


Expected result:
----------------
on my server: I expect "Public Key Authentication Successful"

Actual result:
--------------
A warning that the authentication failed and "Public Key Authentication Failed"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-08 12:15 UTC] mikesul@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

I have updated the bundled libssh2 to version 1.0 for Windows builds.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC