Re: Hoping for a working example of SFTP in PHP
| From: | Scott Lucas | Date: | Mon, 25 Jan 2021 13:54:52 +0000 |
| Subject: | Re: Hoping for a working example of SFTP in PHP | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-327420@lists.php.net to get a copy of this message | ||
Yes my example is only for password auth, this function below needs to be
added for pubkey auth which I have not done.
I would see here and the note there too, there are some comments too which
might help but some look downvoted:
https://www.php.net/manual/en/function.ssh2-auth-pubkey-file.php
Kind regards,
Scott
First Class Watches
9 Warwick Road
Kenilworth
CV8 1HD
Warwickshire
United Kingdom
On Mon, 25 Jan 2021 at 13:47, David Spector <david025@springtimesoftware.com>
wrote:
> Dear Scott,
>
> Thank you for your good-looking example code.
>
> When I ran it, function call "ssh2_auth_password($connection, $user,
> $password)" generated the following message:
>
> "Warning: ssh2_auth_password(): Authentication failed for *** using
> password in upload.php on line 37"
>
> Note that private key authentication is one of the problem areas of all
> the other SFTP examples I have been able to find on the Web.
>
> I have spent weeks trying to find a working example.
>
> David
>