| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
SSH Commander is a powerful, colorful command-line tool for executing commands across multiple SSH servers simultaneously. It supports both password and key-based authentication, custom ports, and can execute both single commands and command files.
Ubuntu/Debian:
CentOS/RHEL:
sudo dpkg -i ssh-commander_*.debIf you encounter any dependency errors during installation, run:
sudo apt -f installThis will automatically install any missing dependencies and complete the installation.
./install.sh # For macOS/Linux
.\install.ps1 # For Windows (Run as Administrator)git clone https://github.com/AthenaNetworks/ssh_commander.git
cd ssh_commanderpython3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt./build_all.shSSH Commander stores server configurations in ~/.config/ssh-commander/servers.yaml. This file is automatically created when you add your first server.
The configuration file uses YAML format and supports both key-based and password authentication:
# Key-based authentication (recommended)
- hostname: web1.example.com
username: admin
key_file: ~/.ssh/id_rsa # Path to your SSH key
port: 22 # Optional, defaults to 22
tags: [prod, web] # Optional, defaults to ['default']
# Password authentication
- hostname: db1.example.com
username: dbadmin
password: your_secure_password # Not recommended for production use
port: 2222
tags: [prod, db] # Optional server tags⚠️ Important Security Warning:
✅ Recommended Approach:
ssh-commander addssh-commander add -y \
--hostname web1.example.com \
--username admin \
--key-file ~/.ssh/id_ed25519 \
--tags prod,webssh-commander edit web1.example.com --port 2222 --tags prod,web,frontend
ssh-commander edit web1.example.com --rename web1-new.example.com
ssh-commander edit db1.example.com --key-file ~/.ssh/id_ed25519ssh-commander list # pretty
ssh-commander list -t prod -o hosts # one hostname per line
ssh-commander list -o json # JSON dump for jq/scriptingssh-commander remove web1.example.com web2.example.com
ssh-commander remove old-host.example.com --yes # no promptssh-commander test
ssh-commander test -t prod --parallel 8ssh-commander config-pathssh-commander exec -c "uptime"ssh-commander exec -c "uptime" -t prod,webssh-commander exec -c "uptime" --parallel 8ssh-commander exec -f commands.txtssh-commander exec -f commands.txt -t staging --stop-on-errorExample commands.txt:
# This is a comment - it will be skipped.
uptime
df -h
free -m
whossh-commander --config prod-servers.yaml exec -c "docker ps"All commands accept the following global options:
| Flag | Description |
|---|---|
| --config FILE | Override the config file path. |
| --timeout SECONDS | SSH connect/banner/auth timeout (default 10). |
| --no-color | Disable ANSI color output (also respects piped output where possible). |
| -q, --quiet | Suppress informational output (errors still print). |
| -v, --verbose | Print extra diagnostic detail (incl. tracebacks on failure). |
| --strict-host-key-checking | Reject unknown SSH host keys instead of auto-adding them. |
| Code | Meaning |
|---|---|
| 0 | Success. |
| 1 | User error (bad flags, missing config, etc.). |
| 2 | Invalid CLI argument. |
| 3 | One or more servers exited non-zero / failed connectivity. |
| 4 | DNS / network error. |
| 130 | Interrupted (Ctrl+C). |
ssh-commander exec -c "systemctl status nginx"ssh-commander exec -c "sudo apt update && sudo apt upgrade -y"ssh-commander exec -c "df -h / /var /home"ssh-commander exec -c "docker ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'"# maintenance.txt
systemctl status nginx
df -h
free -m
find /var/log -type f -size +100M -exec ls -lh {} \;
# Run maintenance checks
ssh-commander exec -f maintenance.txtSSH Commander uses colors to make output more readable:
Password Storage:
SSH Keys:
Network Security:
This project is licensed under the GNU General Public License v3.0 (GPL-3.0) - see the LICENSE file for details.
Key points of the GPL-3.0 license:
If you encounter any issues or have questions:
| Back | FazBrowse Home | New Git URL |