| Server IP : 85.158.181.41 / Your IP : 216.73.217.12 Web Server : Apache System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64 User : moncbefd ( 1024) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/moncbefd/www.moneta.at/vendor/league/flysystem-sftp/ |
Upload File : |
# Flysystem Adapter for SFTP
[](https://twitter.com/frankdejonge)
[](https://travis-ci.org/thephpleague/flysystem-sftp)
[](https://scrutinizer-ci.com/g/thephpleague/flysystem-sftp/code-structure)
[](https://scrutinizer-ci.com/g/thephpleague/flysystem-sftp)
[](LICENSE)
[](https://packagist.org/packages/league/flysystem-sftp)
[](https://packagist.org/packages/league/flysystem-sftp)
[](https://flysystem.thephpleague.com/adapter/sftp/)
This adapter uses phpseclib to provide a SFTP adapter for Flysystem.
## Installation
```bash
composer require league/flysystem-sftp
```
## Documentation
Full documentation of this adapter can be found [here](https://flysystem.thephpleague.com/adapter/sftp/): https://flysystem.thephpleague.com/adapter/sftp/
## Usage
```php
use League\Flysystem\Sftp\SftpAdapter;
use League\Flysystem\Filesystem;
$adapter = new SftpAdapter([
'host' => 'example.com',
'port' => 22,
'username' => 'username',
'password' => 'password',
'privateKey' => 'path/to/or/contents/of/privatekey',
'root' => '/path/to/root',
'timeout' => 10,
'directoryPerm' => 0755
]);
$filesystem = new Filesystem($adapter);
```