Skip to content

kocoten1992/ssh-exec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSH EXEC

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

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published