PHPackages                             nulvem/remote - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. nulvem/remote

ActiveLibrary[HTTP &amp; Networking](/categories/http)

nulvem/remote
=============

SFTP/SSH client library for Laravel

1.0.4(3y ago)414[1 issues](https://github.com/nulvem/remote/issues)MITPHPPHP ^8.1

Since Mar 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nulvem/remote)[ Packagist](https://packagist.org/packages/nulvem/remote)[ RSS](/packages/nulvem-remote/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (3)Versions (8)Used By (0)

Remote SFTP/SSH for Laravel
===========================

[](#remote-sftpssh-for-laravel)

[![Total Downloads](https://camo.githubusercontent.com/ca699c465f954d05c0c37674976c2f7d44f7cf035123c04a2cf9a7a746e61789/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e756c76656d2f72656d6f74652e737667)](https://packagist.org/packages/nulvem/remote)[![Latest Version on Packagist](https://camo.githubusercontent.com/28d0769f4e5e2708c2889d4b7925f1949073851c1f38939d6f84eefd35b78234/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e756c76656d2f72656d6f74652e737667)](https://packagist.org/packages/nulvem/remote)[![License](https://camo.githubusercontent.com/063ed03dcd4ad2911b94a4b164a31e026c82dded42dad09d8eb8e20fc9dfbd83/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e756c76656d2f72656d6f74652e737667)](https://packagist.org/packages/nulvem/remote)

Remote is an SSH and SFTP connection package for the Laravel Framework. Our elegant solution simplifies even complex tasks with familiar Blade syntax. Experience easy, secure connections without tedious setup.

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

[](#installation)

Install the composer package:

```
composer require nulvem/remote
```

Publish the configuration file:

```
artisan vendor:publish --provider="Nulvem\Remote\RemoteServiceProvider"
```

### Configuration

[](#configuration)

### Private key file

[](#private-key-file)

You can put your private key anywhere in the project, just point the key path in the file `/config/remote.php`:

```
[
    'auth' => [
        'key_path' => env('REMOTE_KEY_PATH', storage_path('id_rsa')),
    ],
];
```

The default path is `/storage/id_rsa`.

### Default username

[](#default-username)

The default username is `root`, if you want to change it just add the following variable in the `.env` file:

```
REMOTE_USERNAME=dummy
```

### Logging

[](#logging)

If you want the log of all executions to be saved, just add the desired channel in the `.env` file.

```
REMOTE_LOG_CHANNEL=remote
```

It is recommended to add the following channel in the file `/config/logging.php`:

```
[
    'channels' => [
        'remote' => [
            'driver' => 'daily',
            'path' => storage_path('logs/remote.log'),
            'level' => env('LOG_LEVEL', 'debug'),
            'days' => 14,
        ],
    ],
]
```

Usage
-----

[](#usage)

### SSH

[](#ssh)

#### Generating scripts

[](#generating-scripts)

To generate a new remote script use the following command:

```
php artisan make:remote-script hello-world
```

A file called `hello-world.blade.php` will be generated inside the `/app/Scripts` folder.

If you want to change the default scripts folder, just change the `scripts_path` property inside the file `/config/remote.php`.

#### Executing scripts

[](#executing-scripts)

```
use Nulvem\Remote\Facades\Remote;

$remote = Remote::ssh(host: '0.0.0.0');

$remote->run(script: 'hello-world');
```

If necessary, it is possible to change the default host port:

```
use Nulvem\Remote\Facades\Remote;

$remote = Remote::ssh(
    host: '0.0.0.0',
    port: 2000
);

$remote->run(script: 'hello-world');
```

There is no default timeout, scripts may run forever, if necessary, it is possible to change the default host timeout:

```
use Nulvem\Remote\Facades\Remote;

$remote = Remote::ssh(
    host: '0.0.0.0',
    timeout: 20
);

$remote->run(script: 'hello-world');
```

If necessary, it is possible to pass any parameters to the SSH script:

```
echo "Remote script 'install' started"

echo "Hello, my name is {{ $name }}!"
echo "I will list for you the files in the {{ $dir }} directory..."
pwd

echo "Remote script 'install' finished"
```

```
$remote = Remote::ssh(host: '0.0.0.0');

$remote->run(
    script: 'hello-world',
    data: [
        'name' => 'John Doe',
        'dir' => '/var/www/html'
    ]
)
```

#### Multiple actions on the same connection

[](#multiple-actions-on-the-same-connection)

```
use Nulvem\Remote\Facades\Remote;

$remote = Remote::ssh(host: '0.0.0.0');

$remote->run(script: 'install-server');

someLogic();

$remote->run(script: 'configure-server');
```

#### SSH output

[](#ssh-output)

```
$remote = Remote::ssh(host: '0.0.0.0');

$execution = $remote->run(script: 'hello-world');

$execution->output();

$execution->success();

$execution->failed();
```

> **Warning**
>
> Do not remove the last line `Remote script 'SCRIPT_NAME' finished` on script files, if removed the `success()` and `failed()` methods of the output will not work correctly.

### SFTP

[](#sftp)

#### Downloading files

[](#downloading-files)

```
use Nulvem\Remote\Facades\Remote;

$remote = Remote::sftp(host: '0.0.0.0');

$remote->get(
    from: '/root/sample.json',
    to: storage_path('sample.json')
);
```

#### Uploading files

[](#uploading-files)

```
use Nulvem\Remote\Facades\Remote;

$remote = Remote::sftp(host: '0.0.0.0');

$remote->put(from: storage_path('sample.json'));
```

By default the `/root` path will be used, if you want to use a custom path:

```
use Nulvem\Remote\Facades\Remote;

$remote = Remote::sftp(host: '0.0.0.0');

$remote->put(
    from: storage_path('sample.json'),
    to: '/var/www/html'
);
```

#### Multiple actions on the same connection

[](#multiple-actions-on-the-same-connection-1)

```
use Nulvem\Remote\Facades\Remote;

$remote = Remote::sftp(host: '0.0.0.0');

$remote->get(
    from: '/root/sample.json',
    to: storage_path('sample.json')
);

someLogicToChangeSampleFile();

$remote->put(from: storage_path('sample.json'));
```

#### SFTP output

[](#sftp-output)

```
$remote = Remote::ssh(host: '0.0.0.0');

$execution = $remote->put(from: storage_path('sample.json'));

$execution->success();

$execution->failed();
```

Security
--------

[](#security)

If you've found a bug regarding security please mail  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

7

Last Release

1217d ago

Major Versions

0.0.1 → 1.0.02023-03-03

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9747004?v=4)[Caio Kawasaki](/maintainers/caiokawasaki)[@caiokawasaki](https://github.com/caiokawasaki)

---

Top Contributors

[![caiokawasaki](https://avatars.githubusercontent.com/u/9747004?v=4)](https://github.com/caiokawasaki "caiokawasaki (19 commits)")

---

Tags

laravelscpsshsshsftpscp

### Embed Badge

![Health badge](/badges/nulvem-remote/health.svg)

```
[![Health](https://phpackages.com/badges/nulvem-remote/health.svg)](https://phpackages.com/packages/nulvem-remote)
```

###  Alternatives

[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M193](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M149](/packages/laravel-mcp)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725172.4k14](/packages/tallstackui-tallstackui)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k90.5k1](/packages/mike-bronner-laravel-model-caching)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
