php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41652 ssh2_connect exits with error
Submitted: 2007-06-11 14:46 UTC Modified: 2007-06-11 14:52 UTC
From: cshaulis at bear dot com Assigned:
Status: Not a bug Package: Sockets related
PHP Version: 5.2.3 OS: Windows XP
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cshaulis at bear dot com
New email:
PHP Version: OS:

 

 [2007-06-11 14:46 UTC] cshaulis at bear dot com
Description:
------------
Calling ssh2_connect returns with an error in a situation where it should not.

Reproduce code:
---------------
$con = ssh2_connect('pbptgemapp1', 22);
if (!$con) {
  print "Connection failed !";
}

Expected result:
----------------
I expect to see no output and to have a valid handle in $con


Actual result:
--------------
Warning: ssh2_connect() [function.ssh2-connect]: Error starting up SSH connection(-5): Unable to exchange encryption keys in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ssh2.php on line 5

Warning: ssh2_connect() [function.ssh2-connect]: Unable to connect to pbptgemapp1 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ssh2.php on line 5
Connection failed !

It may be necessary to use Windows to reproduce the problem. (I am using Apache/2.2.4 (Win32) PHP/5.2.3)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-11 14:52 UTC] sniper@php.net
As we don't yet have means to move bug reports around, please re-report this using the PECL bug tracker at: http://pecl.php.net/bugs/report.php?package=ssh2

This will bring this issue to the attention of this package's authors. Thank you.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Oct 18 07:00:01 2025 UTC