php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66941 ssh2_auth_password bug
Submitted: 2014-03-22 07:24 UTC Modified: 2014-04-03 16:12 UTC
Votes:10
Avg. Score:4.4 ± 1.3
Reproduced:0 of 4 (0.0%)
From: vietnguyen at phununet dot com Assigned:
Status: Open Package: ssh2 (PECL)
PHP Version: 5.5.10 OS: centos 6
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-03-22 07:24 UTC] vietnguyen at phununet dot com
Description:
------------
Failed using ssh2_auth_password to server version string: SSH-2.0-dropbear_0.51

Test script:
---------------
ini_set("default_socket_timeout", 60);
	if(($connection = ssh2_connect("68.37.125.193", 22)))
	{
		$auth_methods = ssh2_auth_none($connection, 'user');
		if (in_array('password', $auth_methods)) {
			if(ssh2_auth_password($connection, "pi", "raspberry"))
			{
				echo "Tunnel OK\n";
			} 
			else
			{
				die("failed!"); 
			}
		} else {
			echo "success no password";
		}
		ssh2_exec($connection, 'exit');
	} else {
		echo "timeout";
	}

Expected result:
----------------
The connection to the server was reset while the page was loading.

Actual result:
--------------
The connection to the server was reset while the page was loading.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-03 16:12 UTC] vietnguyen at phununet dot com
Description:
------------
Using ssh2_auth_password for authentication to server 217.86.146.52 and webpage while loading... not return any result

Test script:
---------------
if(($connection = ssh2_connect("217.86.146.52", 22)))
{
	if(ssh2_auth_password($connection, "guest", "guest"))
	{
		echo "Tunnel OK\n";
		ssh2_exec($connection, 'exit');
		unset($connection);
		exit;
	} 
	else
	{
		echo "fail";
		ssh2_exec($connection, 'exit');
		unset($connection);
	}
} else {
	echo "timeout";
}

Expected result:
----------------
Webpage not while loading... and return login success or fail

Actual result:
--------------
The connection to the server was reset while the page was loading.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Aug 23 09:01:27 2019 UTC