php.net |  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
Votes:2
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sweekar07 at yahoo dot com
New email:
PHP Version: OS:

 

 [2011-05-24 15:19 UTC] sweekar07 at yahoo dot com
Description:
------------
---
From manual page: http://www.php.net/function.ssh2-auth-password#Description
---
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

<?php

if(!($con = ssh2_connect("192.168.1.110", "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
else{
stream_set_blocking( $stream, true );
while( $buf = fread($stream,4096) ){
echo "$buf";
}

fclose($stream);
}
}

}

?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-24 15:49 UTC] pajoye@php.net
-Status: Open +Status: Bogus
 [2011-05-24 15:49 UTC] pajoye@php.net
Please report this bug at http://pecl.php.net/ssh2
 [2012-06-13 21:32 UTC] langemeijer@php.net
-Status: Not a bug +Status: Re-Opened -Package: Session related +Package: ssh2
 [2012-06-13 21:34 UTC] langemeijer@php.net
A possible solution is offered in bug #61760. I will check that patch later this 
month.
 [2012-06-13 21:34 UTC] langemeijer@php.net
-Assigned To: +Assigned To: langemeijer
 [2012-06-16 22:06 UTC] langemeijer@php.net
Automatic comment from SVN on behalf of langemeijer
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=326198
Log: Added keyboard-interactive to ssh2_auth_password() - closes bug #61760 and bug #54916
 [2012-06-16 22:13 UTC] langemeijer@php.net
Please try the latest svn revision and see if your problem is fixed.
 [2012-06-16 22:13 UTC] langemeijer@php.net
-Status: Re-Opened +Status: Closed
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Nov 17 08:01:31 2019 UTC