Bug #54916 [Opn->Bgs]: ssh2_auth_password fails while connecting to free bsd
| From: | pajoye@php.net | Date: | Tue, 24 May 2011 13:49:41 +0000 |
| Subject: | Bug #54916 [Opn->Bgs]: ssh2_auth_password fails while connecting to free bsd | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160932@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54916&edit=1
ID: 54916
Updated by: pajoye@php.net
Reported by: sweekar07 at yahoo dot com
Summary: ssh2_auth_password fails while connecting to free
bsd
-Status: Open
+Status: Bogus
Type: Bug
Package: Session related
Operating System: free bsd
PHP Version: 5.2.17
Block user comment: N
Private report: N
New Comment:
Please report this bug at http://pecl.php.net/ssh2
Previous Comments:
------------------------------------------------------------------------
[2011-05-24 15:19:48] 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);
}
}
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54916&edit=1