PHPackages                             ourren/yii2-ssh2 - 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. ourren/yii2-ssh2

ActiveLibrary

ourren/yii2-ssh2
================

SSH2 library for yii2

0.1.1(9y ago)46465MITPHPPHP &gt;=5.4.0

Since May 24Pushed 9y ago2 watchersCompare

[ Source](https://github.com/ourren/yii2-ssh2)[ Packagist](https://packagist.org/packages/ourren/yii2-ssh2)[ RSS](/packages/ourren-yii2-ssh2/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

SSH2 library for yii2
=====================

[](#ssh2-library-for-yii2)

[![Latest Stable Version](https://camo.githubusercontent.com/4fdb91b3b9f23b112bde5cc8007f43e06634dee6108bc5b65eba74350bdcad88/68747470733a2f2f706f7365722e707567782e6f72672f6f757272656e2f796969322d737368322f762f737461626c65)](https://packagist.org/packages/ourren/yii2-ssh2) [![Total Downloads](https://camo.githubusercontent.com/7abb7f173b0a8166fd18adbecdb9bb7d5d84d7f3b252f3b4c712569303948a91/68747470733a2f2f706f7365722e707567782e6f72672f6f757272656e2f796969322d737368322f646f776e6c6f616473)](https://packagist.org/packages/ourren/yii2-ssh2) [![Latest Unstable Version](https://camo.githubusercontent.com/ab9aa16c12031313bdf22a6446b39b252c63d2637dbe43714faa969f6a52b5a9/68747470733a2f2f706f7365722e707567782e6f72672f6f757272656e2f796969322d737368322f762f756e737461626c65)](https://packagist.org/packages/ourren/yii2-ssh2) [![License](https://camo.githubusercontent.com/4274972ba26e2d6f31dff9737c66bf182eb074022a2f7e5069cbbad972240bb1/68747470733a2f2f706f7365722e707567782e6f72672f6f757272656e2f796969322d737368322f6c6963656e7365)](https://packagist.org/packages/ourren/yii2-ssh2)

Pure PHP library widget (based on phpseclib) for Yii2.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require ourren/yii2-ssh2 "*"

```

or add

```
"ourren/yii2-ssh2": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

### Example

[](#example)

```
use ourren\yii2ssh\Yii2ssh;
$yii_ssh = new Yii2ssh();
$host = "127.0.0.1";
$auth['username'] = 'root';
$auth['password'] = 'root';
if($yii_ssh->connect($host, $auth))
{
    $yii_ssh->run([
        'ls -al',
    ], function($line) {
        echo $line;
    });
}

```

Ref
---

[](#ref)

The project is modified based on [thelfensdrfer/yii2sshconsole](https://github.com/thelfensdrfer/yii2sshconsole)

###  Health Score

27

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3589d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f2cc5b551870b7a4c13d561709d13d31e1e65fd82648c7e0caaea1e3c42f4e3?d=identicon)[ourren](/maintainers/ourren)

---

Top Contributors

[![ourren](https://avatars.githubusercontent.com/u/10292916?v=4)](https://github.com/ourren "ourren (4 commits)")

### Embed Badge

![Health badge](/badges/ourren-yii2-ssh2/health.svg)

```
[![Health](https://phpackages.com/badges/ourren-yii2-ssh2/health.svg)](https://phpackages.com/packages/ourren-yii2-ssh2)
```

###  Alternatives

[thelfensdrfer/yii2-ssh-console

SSH library for yii2 console commands

2265.3k](/packages/thelfensdrfer-yii2-ssh-console)

PHPackages © 2026

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