bashanov / sftp-connector
Package to establish secure FTP (SFTP) connection via curl or ssh2.
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.1
Requires (Dev)
- phpunit/phpunit: 6.*
This package is auto-updated.
Last update: 2025-07-18 03:15:56 UTC
README
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.
- Create Factory instance with connection configuration. Example:
/** 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('.'));
- Create
adapter
extendsAbstractAdapter
class and overridegetConfig
method. You may find the example file in repository,src/adapter/TestAdapter
.
Notes
Supports only auth_none
and auth_password
methods.