k92 / ssh-exec
There is no license information available for the latest version (v2.0.2) of this package.
v2.0.2
2025-01-31 13:08 UTC
Requires
- k92/phputils: ^2.1
Requires (Dev)
- phpunit/phpunit: ^11.4
README
Helper tool to generate ssh command line
Usage
use K92\SshExec\SSHEngine; $se = (new SSHEngine) ->from([ 'ssh_privatekey_path' => '/root/.ssh/id_ed25519', ]) ->to([ 'ssh_address' => 'localhost', 'ssh_debug' => true, 'ssh_port' => 22, 'ssh_socket_path' => null, // manual disable multiplexing 'ssh_username' => 'root', ]) ->exec([ 'ls -1 /opt/', 'touch /opt/newfile' ]) ->exec('ls -1 /opt/') ->exec('touch /opt/newfile');
Installation
composer require k92/ssh-exec
Testing
./vendor/bin/phpunit tests