|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2013-01-26 21:24 UTC] camspiers at gmail dot com
  [2021-02-10 11:25 UTC] cmb@php.net
 
-Status:      Open
+Status:      Duplicate
-Assigned To:
+Assigned To: cmb
  [2021-02-10 11:25 UTC] cmb@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 05:00:02 2025 UTC | 
Description: ------------ When you pass in a public or private keyfile path that has a tilde, there seems be some memory corruption that causes a segfault or weird issues the next time, in the same process, you attempt to authenticate with keyfiles. If you pass full paths to the keyfiles, the problem goes away. Test script: --------------- // Attempt one $connection = ssh2_connect('localhost', 22); ssh2_auth_pubkey_file($connection, 'user', '~/.ssh/id_rsa.pub', '~/.ssh/id_rsa'); // Attempt two $connection = ssh2_connect('localhost', 22); ssh2_auth_pubkey_file($connection, 'user', '~/.ssh/id_rsa.pub', '~/.ssh/id_rsa'); // Attempt three $connection = ssh2_connect('localhost', 22); ssh2_auth_pubkey_file($connection, 'user', '~/.ssh/id_rsa.pub', '~/.ssh/id_rsa');