PHPackages                             sbrow/flysystem-ssh-shell - 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. sbrow/flysystem-ssh-shell

ActiveLibrary

sbrow/flysystem-ssh-shell
=========================

SSH/Shell adapter for league/flysystem

1.0.4(6y ago)12MITPHPPHP ^7

Since Jun 18Pushed 6y agoCompare

[ Source](https://github.com/sbrow/flysystem-ssh-shell)[ Packagist](https://packagist.org/packages/sbrow/flysystem-ssh-shell)[ RSS](/packages/sbrow-flysystem-ssh-shell/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (6)Versions (8)Used By (0)

flysystem-ssh-shell
===================

[](#flysystem-ssh-shell)

Flysystem adapter for SSH shell.

### Installation

[](#installation)

```
composer require phuxtil/flysystem-ssh-shell
```

### Requirements

[](#requirements)

The following programs installed and configured on local host:

- ssh
- scp

The following programs installed on the remote host:

- find
- cat
- stat
- rmdir
- mkdir
- chmod
- mv
- rm
- sh compatible shell

### Configuration

[](#configuration)

Use `League\Flysystem\SshShell\SshShellConfigurator` to pass options to adapter.

```
$configurator = (new SshShellConfigurator())
    ->setRoot('/remote_server/path')
    ->setUser('remote_user')
    ->setHost('remote-ssh-host')
    ->setPrivateKey('path/to/id_rsa.private_key')
    ->setPort(22);
```

### Authentication

[](#authentication)

Two authentication methods are supported:

#### via ssh config

[](#via-ssh-config)

The value of `user@host` is configured in ssh config file.

```
$configurator = (new SshShellConfigurator())
    ->setUser('user')
    ->setHost('host');
```

*Note: This is the default setting.*

#### via ssh private key

[](#via-ssh-private-key)

```
$configurator = (new SshShellConfigurator())
    ->setUser('user')
    ->setHost('host')
    ->setPrivateKey('path/to/id_rsa.private_key');
```

Passed as `-i` option to ssh/scp.

*Note: To revert to default setting, unset private key value.*

### Bootstrap

[](#bootstrap)

```
