PHPackages                             montross50/sshpubkey-validator - 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. montross50/sshpubkey-validator

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

montross50/sshpubkey-validator
==============================

Validate ssh-rsa key for valid openssh format.

1.0.1(4y ago)026.0kMITPHPPHP &gt;5.6

Since Jun 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/montross50/sshpubkey-validator)[ Packagist](https://packagist.org/packages/montross50/sshpubkey-validator)[ Docs](https://github.com/montross50/sshpubkey-validator)[ RSS](/packages/montross50-sshpubkey-validator/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (5)Versions (4)Used By (0)

SSHPubKeyValidator
==================

[](#sshpubkeyvalidator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2ab51150aef1f7c3cbe274c3560c2048746078e1c4af0c0f5486f2a0f6d7cfbb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f6e74726f737335302f7373687075626b65792d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/montross50/sshpubkey-validator)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/95c6fc93d7226d76de1f170776db8547ee1895d40216e025c8d400adbdb229d9/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d6f6e74726f737335302f7373687075626b65792d76616c696461746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/montross50/sshpubkey-validator)[![Coverage Status](https://camo.githubusercontent.com/31bf08bede2fa74775555b88fc0974e082d1041d7f3451d7bbeaaf36fe66a7f7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6d6f6e74726f737335302f7373687075626b65792d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/montross50/sshpubkey-validator/code-structure)[![Quality Score](https://camo.githubusercontent.com/b31b24adec1355d549b4bcad47a3daa75f9340ad6c72d81e7352e5d30e643d87/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6d6f6e74726f737335302f7373687075626b65792d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/montross50/sshpubkey-validator)[![Total Downloads](https://camo.githubusercontent.com/846a9fc9ac131d4b3c48da5144927e22d3b791f204a7dddee4c72c53183e2ba4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f6e74726f737335302f7373687075626b65792d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/montross50/sshpubkey-validator)

This package serves to take in an ssh-rsa key and validate whether the key is in a valid format. I'm sure there is a better way to do this but I couldn't find anything better in pure php.

Install
-------

[](#install)

Via Composer

```
$ composer require montross50/sshpubkey-validator
```

Usage
-----

[](#usage)

```
$validator = new montross50\SSHPubKeyValidator();
$key = "ssh-rsa .......";
if($validator->validateKey($key)){
    //key is valid
}
else{
    //key is invalid
}
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [](https://github.com/montross50)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community7

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

Total

2

Last Release

1592d ago

PHP version history (2 changes)1.0.0PHP ~5.6|~7.0

1.0.1PHP &gt;5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/26fd57a3cd2e5e126d0da83b969168f6fce20221ab46813ec38f080b08f11710?d=identicon)[montross50](/maintainers/montross50)

---

Top Contributors

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

---

Tags

montross50SSHPubKeyValidatorsshpubkey-validator

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/montross50-sshpubkey-validator/health.svg)

```
[![Health](https://phpackages.com/badges/montross50-sshpubkey-validator/health.svg)](https://phpackages.com/packages/montross50-sshpubkey-validator)
```

###  Alternatives

[civicrm/civicrm-core

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

751291.4k43](/packages/civicrm-civicrm-core)[phpseclib/mcrypt_compat

PHP 5.x-8.x polyfill for mcrypt extension

28131.4M43](/packages/phpseclib-mcrypt-compat)[akeneo/pim-community-dev

Akeneo PIM, the future of catalog management is open!

1.0k624.1k85](/packages/akeneo-pim-community-dev)[phpseclib/phpseclib2_compat

phpseclib 2.0 polyfill built with phpseclib 3.0

132.1M17](/packages/phpseclib-phpseclib2-compat)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[shopware/app-php-sdk

Shopware App SDK for PHP

15109.8k3](/packages/shopware-app-php-sdk)

PHPackages © 2026

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