PHPackages                             apex/armor-sshkeys - 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. [Security](/categories/security)
4. /
5. apex/armor-sshkeys

ActivePackage[Security](/categories/security)

apex/armor-sshkeys
==================

SSH keys extension for Armor

2.0.1(4y ago)08561MITPHPPHP &gt;=8.0

Since May 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/apexpl/armor-sshkeys)[ Packagist](https://packagist.org/packages/apex/armor-sshkeys)[ Docs](https://apexpl.io)[ RSS](/packages/apex-armor-sshkeys/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (6)Used By (1)

Armor - SSH Keys Extension
==========================

[](#armor---ssh-keys-extension)

An extension for the [Armor package](https://github.com/apexpl/armor/) that provides functionality for management of public SSH keys.

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

[](#installation)

Install via Composer with:

> `composer require apex/armor-sshkeys`

Key Manager
-----------

[](#key-manager)

One library is included, the `Apex\Armor\SshKeys\KeyManager` class that contains the following methods:

- array generate(string $uuid, ?string $password = null, bool $save\_privkey = false) - Generates a new 4096 bit RSA key, and encodes it to public SSH key. Returns array with two elements, "pubkey" and "privkey".
- void import(string $uuid, string $public\_key)
- array getPublic(string $uuid) - Returns array of all public SSH keys assigned to uuid.
- ?string getPrivate(string $uuid, string $password) = Should be avoided, as you shouldn't be storing private keys.
- bool delete(string $uuid, string $public\_key)
- int deleteUuid(string $uuid) - Returns number of keys deleted

Basic Usage
-----------

[](#basic-usage)

```
use Apex\Armor\Armor;
use Apex\Armor\SshKeys\KeyManager;

// Init Armor
$armor = new Armor();
$manager = new KeyManager($armor);

// Generate
$res = $manager->generate('u:511');
echo "Pvi Key: $res[privkey]\n";
echo "Pub Key: $res[pubkey]\n";
```

Support
-------

[](#support)

If you have any questions, issues or feedback, please feel free to drop a note on the [ApexPl Reddit sub](https://reddit.com/r/apexpl/) for a prompt and helpful response.

Follow Apex
-----------

[](#follow-apex)

Loads of good things coming in the near future including new quality open source packages, more advanced articles / tutorials that go over down to earth useful topics, et al. Stay informed by joining the [mailing list](https://apexpl.io/) on our web site, or follow along on Twitter at [@mdizak1](https://twitter.com/mdizak1).

###  Health Score

29

—

LowBetter than 63% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

5

Last Release

1469d ago

Major Versions

0.1.2 → 2.02022-01-30

PHP version history (2 changes)0.1PHP &gt;=8.0.0

2.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4fe486d2ed7db571c0519bb0d52b08b5e953a911936e87331e736a381ef96f29?d=identicon)[apex](/maintainers/apex)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/apex-armor-sshkeys/health.svg)

```
[![Health](https://phpackages.com/badges/apex-armor-sshkeys/health.svg)](https://phpackages.com/packages/apex-armor-sshkeys)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k158.4M190](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k95.2M5.7k](/packages/roave-security-advisories)[ircmaxell/password-compat

A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password\_hash

2.2k56.3M111](/packages/ircmaxell-password-compat)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.1M95](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41176.1M104](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86816.9M54](/packages/bjeavons-zxcvbn-php)

PHPackages © 2026

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