Edit report at http://bugs.php.net/bug.php?id=54916&edit=1

 ID:                 54916
 Updated by:         paj...@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

Reply via email to