SSH
Подключайтесь к удалённым серверам по SSH
SSH (Secure Shell) — широко используемый протокол для безопасного подключения к удалённым серверам, позволяющий выполнять команды, передавать файлы и управлять системами по зашифрованным каналам.
Поддержка SSH в AACFlow позволяет вашим агентам:
- Выполнять удалённые команды: запускайте shell-команды на любом сервере, доступном по SSH
- Загружать и запускать скрипты: легко передавайте и выполняйте многострочные скрипты для расширенной автоматизации
- Безопасно передавать файлы: загружайте и скачивайте файлы в рамках ваших воркфлоу (в скором времени или через команды)
- Автоматизировать управление серверами: выполняйте обновления, обслуживание, мониторинг, деплои и настройку программно
- Использовать гибкую аутентификацию: подключайтесь по паролю или приватному ключу, включая поддержку зашифрованных ключей
Следующие SSH-инструменты AACFlow позволяют вашим агентам взаимодействовать с серверами в рамках больших автоматизаций:
ssh_execute_command: запускайте удалённо любую отдельную shell-команду и получайте вывод, статус и ошибки.
ssh_execute_script: загружайте и выполняйте полноценный многострочный скрипт на удалённой системе.
- (Скоро появятся дополнительные инструменты, например передача файлов.)
Интегрируя SSH в ваши агентские воркфлоу, вы можете автоматизировать безопасный доступ, удалённые операции и оркестрацию серверов — упрощая DevOps, IT-автоматизацию и кастомное удалённое управление прямо из AACFlow.
Выполнить commands, transfer files, и manage remote servers via SSH. Supports password и private key authentication для secure server access.
Выполнить a shell command on a remote SSH server
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
command | string | Да | Shell command to execute on the remote server |
workingDirectory | string | Нет | Working directory for command execution |
| Параметр | Тип | Описание |
|---|
stdout | string | Standard output from command |
stderr | string | Standard error output |
exitCode | number | Command exit code |
success | boolean | Whether command succeeded (exit code 0) |
message | string | Operation status message |
Загрузить и execute a multi-line script on a remote SSH server
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
script | string | Да | Script content to execute (bash, python, etc.) |
interpreter | string | Нет | Script interpreter (default: /bin/bash) |
workingDirectory | string | Нет | Working directory for script execution |
| Параметр | Тип | Описание |
|---|
stdout | string | Standard output from script |
stderr | string | Standard error output |
exitCode | number | Script exit code |
success | boolean | Whether script succeeded (exit code 0) |
scriptPath | string | Temporary path where script was uploaded |
message | string | Operation status message |
Проверить if a command/program exists on the remote SSH server
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
commandName | string | Да | Command name to check (e.g., docker, git, python3) |
| Параметр | Тип | Описание |
|---|
commandExists | boolean | Произошла ли command exists |
commandPath | string | Full path to the command (if found) |
version | string | Command version output (if applicable) |
message | string | Operation status message |
Загрузить a file to a remote SSH server
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
fileContent | string | Да | File content to upload (base64 encoded for binary files) |
fileName | string | Да | Name of the file being uploaded |
remotePath | string | Да | Destination path on the remote server |
permissions | string | Нет | File permissions (e.g., 0644) |
overwrite | boolean | Нет | Whether to overwrite existing files (default: true) |
| Параметр | Тип | Описание |
|---|
uploaded | boolean | Произошла ли file was uploaded successfully |
remotePath | string | Final path on the remote server |
size | number | File size in bytes |
message | string | Operation status message |
Загрузить a file from a remote SSH server
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
remotePath | string | Да | Path of the file on the remote server |
| Параметр | Тип | Описание |
|---|
downloaded | boolean | Произошла ли file was downloaded successfully |
file | file | Downloaded file stored in execution files |
fileContent | string | File content (base64 encoded for binary files) |
fileName | string | Name of the downloaded file |
remotePath | string | Source path on the remote server |
size | number | File size in bytes |
message | string | Operation status message |
Список files и directories in a remote directory
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
path | string | Да | Remote directory path to list |
detailed | boolean | Нет | Include file details (size, permissions, modified date) |
recursive | boolean | Нет | List subdirectories recursively (default: false) |
| Параметр | Тип | Описание |
|---|
entries | array | Массив file and directory entries |
↳ name | string | File or directory name |
↳ type | string | Entry type (file, directory, symlink) |
↳ size | number | File size in bytes |
↳ permissions | string | File permissions |
↳ modified | string | Last modified timestamp |
totalFiles | number | Total number of files |
totalDirectories | number | Total number of directories |
message | string | Operation status message |
Проверить if a file или directory exists on the remote SSH server
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
path | string | Да | Remote file or directory path to check |
type | string | Нет | Expected type: file, directory, or any (default: any) |
| Параметр | Тип | Описание |
|---|
exists | boolean | Произошла ли path exists |
type | string | Type of path (file, directory, symlink, not_found) |
size | number | File size if it is a file |
permissions | string | File permissions (e.g., 0755) |
modified | string | Last modified timestamp |
message | string | Operation status message |
Создать a directory on the remote SSH server
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
path | string | Да | Directory path to create |
recursive | boolean | Нет | Create parent directories if they do not exist (default: true) |
permissions | string | Нет | Directory permissions (default: 0755) |
| Параметр | Тип | Описание |
|---|
created | boolean | Произошла ли directory was created successfully |
remotePath | string | Created directory path |
alreadyExists | boolean | Произошла ли directory already existed |
message | string | Operation status message |
Удалить file или directory from the remote SSH server
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
path | string | Да | Path to delete |
recursive | boolean | Нет | Recursively delete directories (default: false) |
force | boolean | Нет | Force deletion without confirmation (default: false) |
| Параметр | Тип | Описание |
|---|
deleted | boolean | Произошла ли path was deleted successfully |
remotePath | string | Deleted path |
message | string | Operation status message |
Move или rename a file или directory on the remote SSH server
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
sourcePath | string | Да | Current path of the file or directory |
destinationPath | string | Да | New path for the file or directory |
overwrite | boolean | Нет | Overwrite destination if it exists (default: false) |
| Параметр | Тип | Описание |
|---|
moved | boolean | Произошла ли operation was successful |
sourcePath | string | Original path |
destinationPath | string | New path |
message | string | Operation status message |
Получить system information from the remote SSH server
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
| Параметр | Тип | Описание |
|---|
hostname | string | Server hostname |
os | string | Operating system (e.g., Linux, Darwin) |
architecture | string | CPU architecture (e.g., x64, arm64) |
uptime | number | System uptime in seconds |
memory | json | Memory information (total, free, used) |
diskSpace | json | Disk space information (total, free, used) |
message | string | Operation status message |
Read the contents of a remote file
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
path | string | Да | Remote file path to read |
encoding | string | Нет | File encoding (default: utf-8) |
maxSize | number | Нет | Maximum file size to read in MB (default: 10) |
| Параметр | Тип | Описание |
|---|
content | string | File content as string |
size | number | File size in bytes |
lines | number | Number of lines in file |
remotePath | string | Remote file path |
message | string | Operation status message |
Write или append content to a remote file
| Параметр | Тип | Обязательный | Описание |
|---|
host | string | Да | SSH server hostname or IP address |
port | number | Да | SSH server port (default: 22) |
username | string | Да | SSH username |
password | string | Нет | Password for authentication (if not using private key) |
privateKey | string | Нет | Private key for authentication (OpenSSH format) |
passphrase | string | Нет | Passphrase for encrypted private key |
path | string | Да | Remote file path to write to |
content | string | Да | Content to write to the file |
mode | string | Нет | Write mode: overwrite, append, or create (default: overwrite) |
permissions | string | Нет | File permissions (e.g., 0644) |
| Параметр | Тип | Описание |
|---|
written | boolean | Произошла ли file was written successfully |
remotePath | string | File path |
size | number | Final file size in bytes |
message | string | Operation status message |