• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP + SFTP get listing

Drakkon

Diamond Member
I am trying to retrieve a list of files from a SFTP directory using PHP. I have setup SSH2 and have a connection working but I can't seem to find a way to get it to list properly.

here is my connection so far:
----------------------------------
$SSH_CONNECTION = ssh2_connect('services.example.com', 22, array('hostkey'=>'ssh-rsa'));

ssh2_auth_pubkey_file($SSH_CONNECTION,'uname','user/id_rsa.pub','user/id_rsa');

$sftp = ssh2_sftp($SSH_CONNECTION);
--------------------------------------
From there I've tried various stream commands and whatnot to no avail. Any help much appreciated.
 
Back
Top