PHPackages                             librasoft-fr/php-ssh-connection - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. librasoft-fr/php-ssh-connection

ActiveLibrary[HTTP &amp; Networking](/categories/http)

librasoft-fr/php-ssh-connection
===============================

Provides an elegant syntax to connect to SSH servers and execute commands.

3.1.0(3y ago)121.9k↓32.7%1LGPL-3.0-onlyPHPPHP &gt;=7.1

Since Jul 31Pushed 3y agoCompare

[ Source](https://github.com/librasoft-fr/php-ssh-connection)[ Packagist](https://packagist.org/packages/librasoft-fr/php-ssh-connection)[ RSS](/packages/librasoft-fr-php-ssh-connection/feed)WikiDiscussions master Synced 1mo ago

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

PHP SSH Connection
==================

[](#php-ssh-connection)

[![Build Status](https://camo.githubusercontent.com/ffe76d4091b788f56811fa35b915332d190f9b37518dc8d5e62d4611032e885f/68747470733a2f2f7472617669732d63692e636f6d2f6c69627261736f66742d66722f7068702d7373682d636f6e6e656374696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/librasoft-fr/php-ssh-connection)[![Coverage Status](https://camo.githubusercontent.com/7940cd6c5408b6efb95bede21db48fae9efbf541cc90a7ee237c08365d135d5a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6c69627261736f66742d66722f7068702d7373682d636f6e6e656374696f6e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/librasoft-fr/php-ssh-connection?branch=master)

The PHP SSH Connection package provides an elegant syntax to connect to SSH servers and execute commands. It supports both password and public-private keypair authentication, and can easily capture command output and errors.

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

[](#installation)

You can install the PHP SSH Connection package by running the following Composer command.

```
composer require librasoft-fr/php-ssh-connection
```

Usage
-----

[](#usage)

See the following basic usage instructions.

```
$connection = (new SSHConnection())
            ->to('test.rebex.net')
            ->onPort(22)
            ->as('demo')
            ->withPassword('password')
         // ->withPrivateKey($privateKeyPath)
         // ->timeout(0)
            ->connect();

$command = $connection->run('echo "Hello world!"');

$command->getOutput();  // 'Hello World'
$command->getError();   // ''

$connection->upload($localPath, $remotePath);
$connection->download($remotePath, $localPath);
```

For security, you can fingerprint the remote server and verify the fingerprint remains the same upon each subsequent connection.

```
$fingerprint = $connection->fingerprint();

if ($newConnection->fingerprint() != $fingerprint) {
    throw new Exception('Fingerprint does not match!');
}
```

If you wish, you can specify the type of fingerprint you wish to retrieve.

```
$md5Fingerprint  = $connection->fingerprint(SSHConnection::FINGERPRINT_MD5); // default
$sha1Fingerprint = $connection->fingerprint(SSHConnection::FINGERPRINT_SHA1);
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 81.2% 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 ~98 days

Recently: every ~221 days

Total

13

Last Release

1298d ago

Major Versions

v1.3.1 → v2.0.02019-08-08

v2.2.0 → 3.0.02021-07-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/cef1337fd2b8c0eb86eada30a97d61e18458a7832805e4889582dd3062062f71?d=identicon)[librasoft-fr](/maintainers/librasoft-fr)

---

Top Contributors

[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (56 commits)")[![librasoft-fr](https://avatars.githubusercontent.com/u/62438131?v=4)](https://github.com/librasoft-fr "librasoft-fr (6 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (2 commits)")[![php4umagento](https://avatars.githubusercontent.com/u/1795471?v=4)](https://github.com/php4umagento "php4umagento (2 commits)")[![sboesch](https://avatars.githubusercontent.com/u/16945695?v=4)](https://github.com/sboesch "sboesch (2 commits)")[![sonaldo](https://avatars.githubusercontent.com/u/3761019?v=4)](https://github.com/sonaldo "sonaldo (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/librasoft-fr-php-ssh-connection/health.svg)

```
[![Health](https://phpackages.com/badges/librasoft-fr-php-ssh-connection/health.svg)](https://phpackages.com/packages/librasoft-fr-php-ssh-connection)
```

###  Alternatives

[hyperwallet/sdk

A library to manage users, transfer methods and payments through the Hyperwallet API

12532.1k2](/packages/hyperwallet-sdk)[highsidelabs/walmart-api

A PHP client for Walmart's Marketplace, 1P Supplier, and Content Provider APIs.

308.0k](/packages/highsidelabs-walmart-api)

PHPackages © 2026

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