chadjohnson Posted March 21, 2008 Share Posted March 21, 2008 I can successfully transfer files to and from my server using the following code: $connection = ssh2_connect('hostname', 3222); ssh2_auth_password($connection, 'username', 'password'); $sftp = ssh2_sftp($connection); ssh2_scp_send($connection, '/local/directory/bug.gif', '/remote/directory/bug.gif', 0644); ssh2_scp_recv($connection, '/remote/directory/bug.gif', '/local/directory/bug2.gif'); but when I try to do the same with a second server (have not tried a third) I get Warning: ssh2_scp_send(): Failure creating remote file in /media/data/srv/www/test/sftp/prototype.php on line 8 Warning: ssh2_scp_recv(): Unable to receive remote file in /media/data/srv/www/test/sftp/prototype.php on line 9 The second server uses port 3222. I can in fact scp into this second server and transfer files via the command line as well as FileZilla and gFTP just fine. I do in fact have read/write permission on the target directory. What's going on? Please help if possible--it's very urgent. Link to comment https://forums.phpfreaks.com/topic/97196-ssh-scp-functions-not-working-with-a-certain-server/ Share on other sites More sharing options...
chadjohnson Posted March 21, 2008 Author Share Posted March 21, 2008 bump Link to comment https://forums.phpfreaks.com/topic/97196-ssh-scp-functions-not-working-with-a-certain-server/#findComment-497610 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.