Questions tagged [ssh2-sftp]

Request the SFTP subsystem from an already connected SSH2 server.

Request the SFTP subsystem from an already connected SSH2 server. An SSH connection link identifier, obtained from a call to ssh2_connect(). This method returns an SSH2 SFTP resource for use with all other ssh2_sftp_*() methods and the ssh2.sftp:// fopen wrapper.

Sample :

<?php
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'username', 'password');

$sftp = ssh2_sftp($connection);

$stream = fopen("ssh2.sftp://$sftp/path/to/file", 'r');
?>
125 questions
-1
votes
1 answer

Trying to SFTP in PHP Causing 500 error

I've tried several different methods of connecting to an SFTP server and in all cases I get a 500 error either when I connect or when I try to upload a file. I've tried connecting to two different servers, getting the same results each time. I am…
Vincent
  • 1,741
  • 23
  • 35
-1
votes
1 answer

how to know sftp file transfer speed and time taken

Is there a way to calculate the time taken & the speed for downloading/uploading a file via sftp in php as similar to the below? $sftp->get('filename', 'local/filename'); //gets the file $sftp->size('filename'); //gives the size of the file. These…
kumar
  • 1,796
  • 2
  • 15
  • 37
-1
votes
1 answer

Non blocking up/downloads using ssh2_sftp

How can I use non-blocking up/downloads with ssh2_sftp_ (like with ftp_nb_put/ftp_nb_get)?
root66
  • 477
  • 5
  • 17
-1
votes
1 answer

Nginx account create via PHP script?

I am trying to prepare PHP script with the new server nginx web server. Unfortunately, I havent dealt with SSH2 before for php. Maybe some good forum would be able to help me with this?
kalmer
  • 11
  • 1
-2
votes
2 answers

I am creating PHP page in which i am downloading .CSV file from SFTP server

I want to download file from SFTP so i created page which looks like it.
Bhavesh Patel
  • 21
  • 1
  • 2
1 2 3
8
9