2

I am trying to get a file from a remote sftp server in a php script. I'm using the libssh2 library anI have been able to 1) open a connection to the ssh server and 2) authenticate properly. I'm hitting a wall on creating an sftp resource for use with the ssh2_sftp* functions and wrapper. The following line leaves $sftp as NULL:

      $stfp = ssh2_sftp($ftp_conn);

Php error log shows no errors. Ssh server logs show successful login, authentication, and log the sftp subsytem being initialized. Any ideas on where to look next?

Stephen
  • 21
  • 1
  • Maybe you could try phpseclib and enable logging to see what's going on? I find phpseclib better for diagnostic purposes. Actually, I just find it better for just about everything lol but one step at a time. – neubert Aug 08 '13 at 05:35
  • It does look easier to use. I may switch over to that. Still, on the principle of the thing, there aught to be a way to make this work. – Stephen Aug 08 '13 at 06:27
  • There might be but I think it'd be harder to figure out with libssh2. If you can provide the phpseclib logs that might potentially provide some insight into the libssh2 problem as well. – neubert Aug 08 '13 at 14:49

0 Answers0