|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79379 Unable to exchange encryption keys
Submitted: 2020-03-13 10:45 UTC Modified: 2021-02-21 04:22 UTC
From: scoccac at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: ssh2 (PECL)
PHP Version: Next Minor Version OS: Ubuntu Server 16.04
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: scoccac at gmail dot com
New email:
PHP Version: OS:


 [2020-03-13 10:45 UTC] scoccac at gmail dot com
ssh2_connect function can't establish a connection to the server. It give this error:

"Error starting up SSH connection(-5): Unable to exchange encryption keys"

It worked but maybe after an upgrade I have this problem. I don't know if the upgrade regard server or client. 
Obviously the server is up and ssh connection with ssh command prompt work fine.  

Test script:
$this->connection = ssh2_connect($host, $port);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-03-13 11:50 UTC]
You may need a newer libssh2[1], in which case this would not be a PHP issue.

[1] <>
 [2021-02-10 15:36 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-02-10 15:36 UTC]
If you still have this issue, please mention the version of PHP,
ssh2 and libssh2 you are using.
 [2021-02-21 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Aug 07 19:03:40 2022 UTC