PHPackages                             tourze/server-command-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. tourze/server-command-bundle

ActiveSymfony-bundle[CLI &amp; Console](/categories/cli)

tourze/server-command-bundle
============================

远程服务器命令执行与管理系统

1.0.2(7mo ago)12191MITPHPCI passing

Since May 20Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/tourze/server-command-bundle)[ Packagist](https://packagist.org/packages/tourze/server-command-bundle)[ RSS](/packages/tourze-server-command-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (48)Versions (6)Used By (1)

ServerCommandBundle
===================

[](#servercommandbundle)

[English](README.md) | [中文](README.zh-CN.md)

[![Latest Version](https://camo.githubusercontent.com/60d96d1bc481ac36e888dba41992ce66f5fb85cce9c5b89928b672c6be72648e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f7365727665722d636f6d6d616e642d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/server-command-bundle)[![Build Status](https://camo.githubusercontent.com/0346e18af1343d739d0405776c07b83798d5bb0200e3efcfdf657e5e662f6403/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f7068702d6d6f6e6f7265706f2f63692e796d6c3f7374796c653d666c61742d737175617265)](https://github.com/tourze/php-monorepo/actions)[![Quality Score](https://camo.githubusercontent.com/43930c8561a14d3f5a68c62b692ee20749bac4c043e09e88fd3fdd611660198f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f746f75727a652f7068702d6d6f6e6f7265706f2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tourze/php-monorepo)[![Total Downloads](https://camo.githubusercontent.com/64606379f7f5add8c7ea8067a1aaaeda883d6743bf6e1bf193303e3f428a9900/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f7365727665722d636f6d6d616e642d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/server-command-bundle)[![Coverage Status](https://camo.githubusercontent.com/73ee3bab50824f778cedc6b4b3f78bcdab621eef812a979ec388b8ad692a4bff/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f7068702d6d6f6e6f7265706f2e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/tourze/php-monorepo)[![License](https://camo.githubusercontent.com/751082ea9bde6dd35ffa76fba61744725544faa78e3924ae5276fa7a97047aba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f75727a652f7365727665722d636f6d6d616e642d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/server-command-bundle)[![PHP Version](https://camo.githubusercontent.com/b8bdbab12d5ce2cb52e840d9f7913141942048c57b5819adb7097e6153fc1f8f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f7365727665722d636f6d6d616e642d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/server-command-bundle)

A comprehensive server command execution bundle for Symfony applications, providing remote SSH command execution, file transfer, web terminal emulator, and server management capabilities.

Table of Contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Routing Configuration](#routing-configuration)
- [Quick Start](#quick-start)
- [API Endpoints](#api-endpoints)
- [SSH Authentication](#ssh-authentication)
- [Development &amp; Testing](#development-testing)
- [Advanced Usage](#advanced-usage)
- [Advanced Features](#advanced-features)
- [Troubleshooting](#troubleshooting)
- [Contributing](#contributing)
- [References](#references)
- [License](#license)

Features
--------

[](#features)

- **Remote SSH Command Execution** - Execute commands on remote servers with full status tracking
- **Web Terminal Emulator** - Browser-based terminal interface with command history
- **File Transfer** - SFTP-based file upload/download with progress tracking
- **Docker Environment Management** - Automated Docker installation and configuration
- **DNS Configuration Management** - DNS pollution detection and fixing
- **Multiple Authentication Methods** - SSH key authentication with password fallback
- **Asynchronous Processing** - Message queue integration for long-running commands
- **EasyAdmin Integration** - Complete admin interface for command management
- **Comprehensive Logging** - Detailed execution logs and error tracking

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Symfony 6.4 or higher
- ext-filter extension
- tourze/server-node-bundle for node management

Installation
------------

[](#installation)

```
composer require tourze/server-command-bundle
```

### Bundle Registration

[](#bundle-registration)

```
// config/bundles.php
return [
    // ...
    ServerCommandBundle\ServerCommandBundle::class => ['all' => true],
    // ...
];
```

Routing Configuration
---------------------

[](#routing-configuration)

Customize routing prefixes if needed:

```
# config/routes.yaml
server_command_terminal:
    resource: "@ServerCommandBundle/Controller/TerminalController.php"
    type: attribute
    prefix: /admin/terminal
```

Quick Start
-----------

[](#quick-start)

### Remote Command Execution

[](#remote-command-execution)

```
