This php library is used to connect to remote hosts via SSH
You need the php_ssh2 library installed in your environment.
- Install Library Linux - Tested on Ubuntu 18.04
- Install Library Windows - Tested on Windows 11 - xampp v3.3.0 - php 8.1.6
composer require nilsonpessim/ssh-connect
<?php
require "../vendor/autoload.php";
use Nilsonpessim\SshConnect\SSH;
var_dump(
(new SSH('127.0.0.1', 22, root, ''))->exec('ls -la')
);