Re: Hoping for a working example of SFTP in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David,

I have written a working and tested example using Win 10 Pro, and PHP v7.4.14 with pecl-ssh2 v1.2.

https://gist.github.com/sikofitt/3c6818648874ce091006ff58f8f489c4

There are 2 examples of copying via ssh2.sftp:// stream and the ssh2_scp_send function.  Also a directory iterator example.
https://www.php.net/manual/en/wrappers.ssh2
https://www.php.net/manual/en/function.ssh2-scp-send

It sounds like you have found the private and public keys and had them working using ssh from the command line.  You can also pass the '-v' switch to the ssh program and it will tell you exactly what it is doing to connect.

Hope this helps!

Eric



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux