PHPackages                             sunxyw/flysystem-sftp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. sunxyw/flysystem-sftp

ActiveLibrary[File &amp; Storage](/categories/file-storage)

sunxyw/flysystem-sftp
=====================

Flysystem adapter for SFTP

2.0.2(5y ago)010MITPHPPHP ^7.2 || ^8.0

Since Jan 21Pushed 5y agoCompare

[ Source](https://github.com/sunxyw/flysystem-sftp)[ Packagist](https://packagist.org/packages/sunxyw/flysystem-sftp)[ RSS](/packages/sunxyw-flysystem-sftp/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (37)Used By (0)

Flysystem Adapter for SFTP
==========================

[](#flysystem-adapter-for-sftp)

[![Author](https://camo.githubusercontent.com/bf87237874a25aebcf58b7f23dfdeb9098e58b5c011ca83aed2b6e519a392d84/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d406672616e6b64656a6f6e67652d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/frankdejonge)[![Build Status](https://camo.githubusercontent.com/99fa0d5fcf9aeae3172fa484692680f4ed09e99ce9fa549feed644e1ba70c8e2/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468657068706c65616775652f666c7973797374656d2d736674702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/thephpleague/flysystem-sftp)[![Coverage Status](https://camo.githubusercontent.com/63b81d2539c1ec2cd676c027c6cc5d1e204ac0fc71f32eb8d6463a79d895094b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7468657068706c65616775652f666c7973797374656d2d736674702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/flysystem-sftp/code-structure)[![Quality Score](https://camo.githubusercontent.com/d67736c61b56e889ebe3d74a66510fa0c7d4a8e765c453341b72fd77dcbfc84b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7468657068706c65616775652f666c7973797374656d2d736674702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/flysystem-sftp)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/8beac1c0e5f1299df8e29b72526d7a56a95e5ecea5ddc176011e9664e86627ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c65616775652f666c7973797374656d2d736674702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/flysystem-sftp)[![Total Downloads](https://camo.githubusercontent.com/cfbb9d38adb180e57d0aeb3be182031da1e6a8c82b7b3c647a1a39a351811c42/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c65616775652f666c7973797374656d2d736674702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/flysystem-sftp)[![Documentation](https://camo.githubusercontent.com/2dd1812e6875efed584ad3534542534568e794f51e397abeb33703097f840009/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f726561642d646f63756d656e746174696f6e2d627269676874677265656e2e737667)](https://flysystem.thephpleague.com/adapter/sftp/)

This adapter uses phpseclib to provide a SFTP adapter for Flysystem.

Installation
------------

[](#installation)

```
composer require league/flysystem-sftp
```

Documentation
-------------

[](#documentation)

Full documentation of this adapter can be found [here](https://flysystem.thephpleague.com/adapter/sftp/):

Usage
-----

[](#usage)

```
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',
    'passphrase' => 'passphrase-for-privateKey',
    'root' => '/path/to/root',
    'timeout' => 10,
    'directoryPerm' => 0755
]);

$filesystem = new Filesystem($adapter);
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 69.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~63 days

Recently: every ~10 days

Total

35

Last Release

1985d ago

Major Versions

1.0.22 → 2.0.0-alpha.12020-03-09

PHP version history (4 changes)1.0.0PHP &gt;=5.4.0

1.0.15PHP &gt;=5.6.0

2.0.0-alpha.1PHP ^7.2

2.0.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0074b4d8ef244d2d516e67fe7949e287b37eeee02d4adfa0da953077bf7e0121?d=identicon)[sunxyw](/maintainers/sunxyw)

---

Top Contributors

[![frankdejonge](https://avatars.githubusercontent.com/u/534693?v=4)](https://github.com/frankdejonge "frankdejonge (79 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (8 commits)")[![skoop](https://avatars.githubusercontent.com/u/90003?v=4)](https://github.com/skoop "skoop (3 commits)")[![sunxyw](https://avatars.githubusercontent.com/u/31698606?v=4)](https://github.com/sunxyw "sunxyw (2 commits)")[![danut007ro](https://avatars.githubusercontent.com/u/1083134?v=4)](https://github.com/danut007ro "danut007ro (2 commits)")[![sandisk](https://avatars.githubusercontent.com/u/573405?v=4)](https://github.com/sandisk "sandisk (2 commits)")[![fabiang](https://avatars.githubusercontent.com/u/348344?v=4)](https://github.com/fabiang "fabiang (1 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (1 commits)")[![intrepido](https://avatars.githubusercontent.com/u/3216724?v=4)](https://github.com/intrepido "intrepido (1 commits)")[![jeroensmit](https://avatars.githubusercontent.com/u/1814884?v=4)](https://github.com/jeroensmit "jeroensmit (1 commits)")[![kfriend](https://avatars.githubusercontent.com/u/634835?v=4)](https://github.com/kfriend "kfriend (1 commits)")[![marcodearaujo](https://avatars.githubusercontent.com/u/4330991?v=4)](https://github.com/marcodearaujo "marcodearaujo (1 commits)")[![matjon](https://avatars.githubusercontent.com/u/6708839?v=4)](https://github.com/matjon "matjon (1 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (1 commits)")[![Sekonda](https://avatars.githubusercontent.com/u/127744940?v=4)](https://github.com/Sekonda "Sekonda (1 commits)")[![sfarkas1988](https://avatars.githubusercontent.com/u/5331193?v=4)](https://github.com/sfarkas1988 "sfarkas1988 (1 commits)")[![tehla](https://avatars.githubusercontent.com/u/9618883?v=4)](https://github.com/tehla "tehla (1 commits)")[![Anahkiasen](https://avatars.githubusercontent.com/u/1321596?v=4)](https://github.com/Anahkiasen "Anahkiasen (1 commits)")[![weshooper](https://avatars.githubusercontent.com/u/2248206?v=4)](https://github.com/weshooper "weshooper (1 commits)")[![andreasschroth](https://avatars.githubusercontent.com/u/13320551?v=4)](https://github.com/andreasschroth "andreasschroth (1 commits)")

---

Tags

filesystemFlysystemsftpfilefiles

### Embed Badge

![Health badge](/badges/sunxyw-flysystem-sftp/health.svg)

```
[![Health](https://phpackages.com/badges/sunxyw-flysystem-sftp/health.svg)](https://phpackages.com/packages/sunxyw-flysystem-sftp)
```

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.2k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M788](/packages/league-flysystem-aws-s3-v3)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

6129.6M91](/packages/league-flysystem-sftp-v3)[league/flysystem-local

Local filesystem adapter for Flysystem.

226231.8M39](/packages/league-flysystem-local)[league/flysystem-ziparchive

ZIP filesystem adapter for Flysystem.

1039.3M58](/packages/league-flysystem-ziparchive)[league/flysystem-memory

In-memory filesystem adapter for Flysystem.

8533.6M194](/packages/league-flysystem-memory)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
