1 год назад
История
readme.md
pantagruel74/ssh-command-executor
Requirements
- PHP >= 7.4
- php-ext-mbstring
- php-ext-json
- openSSH installed on machine
- sshpass installed on machine
Description
Package for loading, preparing and executing remote ssh commands.Install
- composer require “pantagruel74/ssh-command-executor”
Using
Services
- SSHConfigLoader - using for loading SSHConfig object from stdObject, array or file
- CommandLoader - using for loading command from file.
- may be configured by SSHConfig, thats will be set to creating Commands
- may be configured by text replace instructions, thats will be set to creating Commands
Objects
- SSHConfig - object used for transport SSHConnection access information, used for configuring SSHCommand
- Command - object for configuring commands list for remote SSH execution and running them
- Should be configured by:
- SSHConfig object
- Text replace instructions (as array type of: [<search> => <replace>, ...])
- String of commands divided by "\n" symbol
- For running command call: Command->executeCommand(): string method. - result string is the terminal output
License
- MIT
Contacts
- Anatoly Starodubtsev
- Tostar74@mail.ru
Конвейеры
0 успешных
0 с ошибкой