PHPackages                             bashkarev/ssh - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bashkarev/ssh

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bashkarev/ssh
=============

08PHP

Since Oct 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/bashkarev/ssh)[ Packagist](https://packagist.org/packages/bashkarev/ssh)[ RSS](/packages/bashkarev-ssh/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Native ssh client
=================

[](#native-ssh-client)

status: in progress

[![Build Status](https://camo.githubusercontent.com/38822408351ebb2f10547e5bd3351706c370626190bda0e5a2c625c9568dbcad/68747470733a2f2f7472617669732d63692e6f72672f626173686b617265762f7373682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bashkarev/ssh)

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

[](#installation)

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

Either run

```
composer require bashkarev/ssh

```

Usage
-----

[](#usage)

```
$client = new \Bashkarev\Ssh\Client('127.0.0.1');
$client
    ->setPort(22)
    ->setUser('ssh_user')
    ->setIdentityFile('path/to/private_key')
    ->setForwardAgent(true);

/**
 * @var \Bashkarev\Ssh\Command $command
 */
$command = $client->exec('php -v', 360, 60);
foreach ($command->getIterator() as $type => $data) {
    if ($command::OUT === $type) {
        echo "\nRead from stdout: " . $data;
    } else { // $command::ERR === $type
        echo "\nRead from stderr: " . $data;
    }
}

$command->getExitCode();
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/43b9a90dc4a3db78eb835f5820f362f29af14d5cc95fdabc6a22738661bb111a?d=identicon)[bashkarev](/maintainers/bashkarev)

---

Top Contributors

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

---

Tags

sshssh-client

### Embed Badge

![Health badge](/badges/bashkarev-ssh/health.svg)

```
[![Health](https://phpackages.com/badges/bashkarev-ssh/health.svg)](https://phpackages.com/packages/bashkarev-ssh)
```

PHPackages © 2026

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