|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2021-01-09 18:22 UTC] dev at springtimesoftware dot com
Description: ------------ Environment: PHP 7.4.13 (this value not available in dropdown box) Windows 7.4 Thread Safe (TS) x64 package downloaded from https://pecl.php.net/package/ssh2/1.2/windows In PHP.ini: [SSH2] extension=php_ssh2.dll Test script: --------------- Script showing problem: The parameters used in this script have worked in coreFTP, a manual sFTP program, and in PuTTY, a manual SSH program. ==== $c=GetConfigArr("secret.json"); extract($c); echo "Uploading...".N; $methods=['kex' => 'diffie-hellman-group1-sha1', 'client_to_server' => [ 'crypt' => '3des-cbc', 'comp' => 'none'], 'server_to_client' => [ 'crypt' => 'aes256-cbc,aes192-cbc,aes128-cbc', 'comp' => 'none']]; /* Callback if the server terminates the connection */ function on_ssh_disconnect($reason, $message, $language) { printf("Server disconnected with reason code [%d] and message: %s\n", $reason, $message); } $cb=['disconnect' => 'on_ssh_disconnect']; $conn = ssh2_connect($c['hostDomain'],$c['securePort'],$methods,$cb); var_export($conn); exit; ==== Note: also fails if "hostDomain" is changed to "hostIP". Expected result: ---------------- I expect to be able to connect to the remote (Centos/Apache/cPanel) web server with a returned non-null connection resource. I expected this script to work, since it was more or less copied from an example in the PHP Manual, but it fails with error message "PHP Warning: ssh2_auth_password(): Authentication failed for username using password in C:\Dropbox\Private\Web\nsr-HMAC\upload\upload.php on line 29". Actual result: -------------- Output: Uploading... NULL PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 14:00:01 2025 UTC |
There are mirrors of the sources of the PHP manual on Github: <https://github.com/php/doc-en/> <https://github.com/php/doc-base/> There are instructions on how to work on the manual on: <https://github.com/php/doc-base/#readme> However, these are currently for those with push access to the actual Git repos on git.php.net. You'd basically have to replace the git@git.php.net URIs with the Github ones when doing the "Source checkout".