https://github.com/bashanov/sftp-connector
Library helps to establish SFTP connection and work with files and folders via curl or ssh2.
https://github.com/bashanov/sftp-connector
curl sftp ssh
Last synced: 15 days ago
JSON representation
Library helps to establish SFTP connection and work with files and folders via curl or ssh2.
- Host: GitHub
- URL: https://github.com/bashanov/sftp-connector
- Owner: bashanov
- License: mit
- Created: 2019-06-17T11:53:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-17T13:31:44.000Z (over 6 years ago)
- Last Synced: 2025-05-22T16:04:07.161Z (8 months ago)
- Topics: curl, sftp, ssh
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sftp-connector
Library helps to establish SFTP connection and work with files and folders via curl or ssh2.
## Install
Use composer to install
```
composer require bashanov/sftp-connector
```
## Use
There are 2 ways to create sftp connection.
1. Create Factory instance with connection configuration. Example:
```php
/** Creating new connection and getting information about files and folders in current directory */
$sftp = SftpConnectorFactory::createConnection([
'host' => 'test.website.com',
'username' => 'login',
'password' => 'password'
]);
print_r($sftp->ls('.'));
```
2. Create `adapter` extends `AbstractAdapter` class and override `getConfig` method. You may find the example file in repository, `src/adapter/TestAdapter`.
## Notes
Supports only `auth_none` and `auth_password` methods.