Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stickeeuk/laravel-sftp-dual-auth
Laravel SFTP driver supporting SSH key and password at the same time
https://github.com/stickeeuk/laravel-sftp-dual-auth
laravel laravel-framework league-flysystem-wrapper sftp
Last synced: about 1 month ago
JSON representation
Laravel SFTP driver supporting SSH key and password at the same time
- Host: GitHub
- URL: https://github.com/stickeeuk/laravel-sftp-dual-auth
- Owner: stickeeuk
- Created: 2019-10-16T13:31:44.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-09-06T09:13:49.000Z (about 1 year ago)
- Last Synced: 2024-10-01T16:53:44.178Z (about 1 month ago)
- Topics: laravel, laravel-framework, league-flysystem-wrapper, sftp
- Language: PHP
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stickee Laravel SFTP Dual Auth
Provides a dual-authentication filesystem driver for [Laravel](https://laravel.com/).
The built-in sftp driver supports key-based login and password-based login, but not both at the same time. This driver provides that capability.## Installation
Install with composer:
`composer require stickee/laravel-sftp-dual-auth`
If you don't use auto-discovery, add the SftpDualAuthServiceProvider to the providers array in *config/app.php*
```
Stickee\LaravelSftpDualAuth\SftpDualAuthServiceProvider::class,
```## Usage
You can noew use *sftp_dual_auth* as a disk driver in *config/filesystems.php*
```
'disks' => ['local' => [
'driver' => 'local',
'root' => storage_path('app'),
],'my_dual_auth' => [
'driver' => 'sftp_dual_auth',
'host' => env('MY_SFTP_HOST'),
'username' => env('MY_SFTP_USERNAME'),
'password' => env('MY_SFTP_PASSWORD'),
'privateKey' => env('MY_SFTP_PRIVATE_KEY'),
'root' => env('MY_SFTP_ROOT', ''),
],]
```See the [League Flysystem SFTP documentation](https://flysystem.thephpleague.com/docs/adapter/sftp/) ([GitHub](https://github.com/thephpleague/flysystem-sftp)) for information on the configuration options.