Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ddeboer/ddeboersshbundle

A small Symfony2 bundle for integrating Antoine Hérault’s PHP-SSH library into your Symfony2 project
https://github.com/ddeboer/ddeboersshbundle

Last synced: about 1 month ago
JSON representation

A small Symfony2 bundle for integrating Antoine Hérault’s PHP-SSH library into your Symfony2 project

Awesome Lists containing this project

README

        

SSH Symfony2 Bundle
===================

Introduction
------------
A small Symfony2 bundle for integrating Antoine Hérault’s PHP-SSH library into your
Symfony2 project.

Requirements
------------

You need to install Antoine Hérault’s [PHP-SSH wrapper](https://github.com/Herzult/php-ssh) first.

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

Install this bundle like you would any other Symfony2 bundle. (Installation will
soon be migrated to using Composer.)

Usage
-----

In your `config.yml`:

```
ddeboer_ssh:
connections:
an_sftp_server:
host: hostname.com
authentication_password:
username: my_username
password: my_password
```

In your application code:

```
$session = $this->getSession();
$sftp = $session->getSftp();
$sftp->write('/home/my_username/just_a_file.txt', 'some file contents');
```

For more information, please refer to the [PHP-SSH documentation](https://github.com/Herzult/php-ssh).