sshsync is a minimal and efficient CLI tool designed for executing shell commands concurrently across multiple remote servers using SSH. Tailored for sysadmins and developers, it streamlines automation workflows, allowing easy targeting of servers with features like dry-run mode and file transfers.
sshsync is a high-performance, minimal command-line interface (CLI) tool designed for executing shell commands across multiple remote servers via SSH. With sshsync, users can efficiently manage commands across all servers or specific groups, making it an invaluable resource for system administrators, developers, and automation enthusiasts.
Key Features
- Command Execution on Multiple Hosts: Run shell commands concurrently across all configured servers or targeted groups, streamlining administrative tasks.
- Group Management: Easily organize and manage your servers with group-based configurations for more accessible command targeting.
- File Transfer Capabilities: Push and pull files between local and remote hosts, facilitating seamless integration of resources.
- Operation History and Logging: Maintain a record of operations and log details for accountability and troubleshooting purposes.
- Dry-run Mode: Preview commands and actions before execution, helping to prevent unintended changes or errors.
- Customizable SSH Settings: Adjust SSH timeout settings to accommodate specific operational requirements.
Command Usage
Generic Format
sshsync [OPTIONS] COMMAND [ARGS]...
Execute Commands on All Hosts
For example, to check disk space across all servers:
sshsync all --timeout 20 "df -h"
Execute Commands on Specific Groups
Restarting services on a specific group like web servers can be done as follows:
sshsync group web-servers "sudo systemctl restart nginx"
File Operations
Push Files: To push a configuration file to all hosts:
sshsync push --all ./config.yml /etc/app/config.yml
Pull Files: To pull log files from a designated group:
sshsync pull --group db-servers /var/log/mysql/error.log ./logs/
Configuration Management
sshsync facilitates easy management of host groupings and SSH configuration by leveraging existing data. Configurations are easily modifiable through a dedicated YAML file, allowing for straightforward updates and assignments.
Logging and Operation History
Logs are automatically generated and stored in platform-specific directories, enabling users to track command executions and file transfers across their infrastructure.
Upcoming Features
- Live display of command outputs as they are executed.
- Enhancements to optimize performance for larger server fleets.
- Support for additional authentication methods to broaden usability.
sshsync empowers users to manage multiple servers effectively, ensuring that routine tasks can be performed quickly and reliably in complex environments.
No comments yet.
Sign in to be the first to comment.