Download the PHP package pacoorozco/openssh without Composer

On this page you can find all versions of the php package pacoorozco/openssh. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package openssh

Creating and loading private/public OpenSSH keys

Latest Version on Packagist Tests

This package allows you to easily generate OpenSSH private/public key pairs, which can be used as authentication method in SSH connections.

Most functions in this package are wrappers around phpseclib functions.

Installation

You can install the package via composer:

Usage

You can generate a private key using the generate function and saving it to a file:

Loading keys

To load a key from a file use the fromFile static method:

Alternatively, you can also create a key object using a string.

At any time, you can obtain the public key from a private key

[RSA keys only] Encrypting a message with a public key, decrypting with the private key

Here's how you can encrypt data using the public key, and how to decrypt it using the private key.

If decrypt cannot decrypt the given data (maybe a non-matching public key was used to encrypt the data, or maybe tampered with the data), an exception of class \PacoOrozco\OpenSSH\Exceptions\BadDecryptionException will be thrown.

Determining if the data can be decrypted

The PrivateKey class has a canDecrypt method to determine if given data can be decrypted.

Signing and verifying data

The PrivateKey class has a method sign to generate a signature for the given data. The verify method on the PublicKey class can be used to verify if a signature is valid for the given data.

If verify returns true, you know for certain that the holder of the private key signed the message, and that it was not tampered with.

Validating inputs (Laravel)

You can use this library to validate form inputs.

To validate if an input is a valid public or private key you can use:

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.


All versions of openssh with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^8|^9|^10
phpseclib/phpseclib Version ^3.0.23
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pacoorozco/openssh contains the following files

Loading the files please wait ....