Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
DivineOmega authored Aug 5, 2019
1 parent e905cd7 commit 7efa40b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,20 @@
[![Build Status](https://travis-ci.com/DivineOmega/php-ssh-connection.svg?branch=master)](https://travis-ci.com/DivineOmega/php-ssh-connection)
[![Coverage Status](https://coveralls.io/repos/github/DivineOmega/php-ssh-connection/badge.svg?branch=master)](https://coveralls.io/github/DivineOmega/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

First, you may need to install the PHP SSH2 extension. In Ubuntu and other Debian-based systems, you can install this extension by running the following command.

```bash
sudo apt install php-ssh2
```

For other operating systems, see the [PHP SSH2 extension documentation](https://www.php.net/manual/en/book.ssh2.php).

You can then run the following Composer command to install the PHP SSH Connection package.

```bash
composer require divineomega/php-ssh-connection
```
Expand All @@ -24,4 +36,4 @@ $command = $connection->run('echo "Hello world!"');

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

0 comments on commit 7efa40b

Please sign in to comment.