sftp
| From: | blackwater dev | Date: | Fri, 04 Jan 2008 20:21:23 +0000 |
| Subject: | sftp | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-266647@lists.php.net to get a copy of this message | ||
I have a script that has to make a connection via sftp and read the contents
of a file. In the shell, I can simply type
sftp myname@remoteserver
As I use the keys on the server so don't need a password. How can I make
this connection in php so I can get the data contents nightly? We installed
teh ssh2 pecl package and I saw an example showing:
$file=fopen("ssh2.sftp://myname@remoteserver:22/files/myfile.txt","r");
Yet php throws the error that it can't find the ssh2.sftp wrapper. First,
if ssh2 installed properly is this fopen syntax correct? Second, how would
I know if ssh2 is install properly?
THanks!