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

ActiveLibrary

behnampro/yii2-ssh2
===================

SSH2 library for yii2

v0.1.2(8y ago)19.6k↓100%1MITPHPPHP &gt;=5.4.0

Since May 24Pushed 8y agoCompare

[ Source](https://github.com/behnampro/yii2-ssh2)[ Packagist](https://packagist.org/packages/behnampro/yii2-ssh2)[ RSS](/packages/behnampro-yii2-ssh2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (4)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.

modified for integrity and fix confilict with Yii2

by : Behnam mirzaee

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

[](#installation)

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

Either run

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

```

or add

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

```

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

Usage
-----

[](#usage)

### Example

[](#example)

```
use behnampro\yii2ssh\Yii2ssh;

$yii_ssh = new Yii2ssh();
$host = "127.0.0.1";
$auth['username'] = 'admin';
$auth['password'] = 'password';
if($yii_ssh->connect($host, $auth))
{
    $yii_ssh->run_ssh([
        'ls -al',
    ], function($line) {
        echo $line;
    });
}

```

Ref
---

[](#ref)

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

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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 ~309 days

Total

3

Last Release

3020d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d8df568337deca32ccd5f847fa0722c2d620f4cc01709c248efae67902fe623a?d=identicon)[behnampro](/maintainers/behnampro)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M529](/packages/laravel-passport)[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k17](/packages/civicrm-civicrm-core)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

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

Shopware platform is the core for all Shopware ecommerce products.

595.2M385](/packages/shopware-core)[yoti/yoti-php-sdk

Yoti SDK for quickly integrating your PHP backend with Yoti

27539.9k1](/packages/yoti-yoti-php-sdk)

PHPackages © 2026

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