|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54916 ssh2_auth_password fails while connecting to free bsd
Submitted: 2011-05-24 15:19 UTC Modified: 2012-06-16 22:13 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: sweekar07 at yahoo dot com Assigned: langemeijer (profile)
Status: Closed Package: ssh2 (PECL)
PHP Version: 5.2.17 OS: free bsd
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: sweekar07 at yahoo dot com
New email:
PHP Version: OS:


 [2011-05-24 15:19 UTC] sweekar07 at yahoo dot com
From manual page:
if(!ssh2_auth_password($con, 'root', 'qwerty')) {
echo "fail: unable to authenticate\n";
} else {

ssh2_auth_password always fails when iconnect to a free bsd machine

works fine when i connect to other linux machines

Test script:
This is a simple php script witch I use to connect to FreeBSD


if(!($con = ssh2_connect("", "22"))){
echo "fail: unable to establish connection\n";
} else {
if(!ssh2_auth_password($con, 'root', 'qwerty')) {
echo "fail: unable to authenticate\n";
} else {

if(!($stream = ssh2_exec($con, "uptime" )) ){
echo "fail: unable to execute command\n";
// collect returning data from command
stream_set_blocking( $stream, true );
while( $buf = fread($stream,4096) ){
echo "$buf";





Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-24 15:49 UTC]
-Status: Open +Status: Bogus
 [2011-05-24 15:49 UTC]
Please report this bug at
 [2012-06-13 21:32 UTC]
-Status: Not a bug +Status: Re-Opened -Package: Session related +Package: ssh2
 [2012-06-13 21:34 UTC]
A possible solution is offered in bug #61760. I will check that patch later this 
 [2012-06-13 21:34 UTC]
-Assigned To: +Assigned To: langemeijer
 [2012-06-16 22:06 UTC]
Automatic comment from SVN on behalf of langemeijer
Log: Added keyboard-interactive to ssh2_auth_password() - closes bug #61760 and bug #54916
 [2012-06-16 22:13 UTC]
Please try the latest svn revision and see if your problem is fixed.
 [2012-06-16 22:13 UTC]
-Status: Re-Opened +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 23 06:01:35 2024 UTC