Skip to content
Back to skills

Ssh Batch Manager

ASecurity

Batch SSH key management. Distribute/remove SSH keys to/from multiple servers with intelligent connectivity pre-check and source tracking.

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 9, 2026
securitypythonbashsqlgitsecurityperformance

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 9, 2026

npx -y skills add Lord1Egypt/awesome-skill-forge --skill ssh-batch-manager --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ssh Batch Manager?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ssh Batch Manager
[![Security: A โ€” Skills Directory](https://www.skillsdirectory.com/api/skills/lord1egypt-ssh-batch-manager/badge)](https://www.skillsdirectory.com/skills/lord1egypt-ssh-batch-manager)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ssh-batch-manager
description: Batch SSH key management. Distribute/remove SSH keys to/from multiple servers with intelligent connectivity pre-check and source tracking.
homepage: https://gitee.com/subline/onepeace/tree/develop/src/skills/ssh-batch-manager
metadata:
  {
    "openclaw":
      {
        "emoji": "๐Ÿ”‘",
        "requires": { "bins": ["ssh", "ssh-copy-id", "sshpass"], "python_packages": ["cryptography"] },
        "install":
          [
            {
              "id": "python",
              "kind": "pip",
              "package": "cryptography",
              "label": "Install cryptography library",
            },
            {
              "id": "sshpass",
              "kind": "apt",
              "package": "sshpass",
              "label": "Install sshpass for password-based SSH",
            },
            {
              "id": "post-install",
              "kind": "script",
              "script": "post-install.sh",
              "label": "Configure and auto-start Web UI service",
            },
          ],
      },
  }
---

# SSH Batch Manager

## โš ๏ธ CRITICAL SAFETY RULE

**EN: Before executing ANY enable operation (enable-all, enable-single, etc.), the agent MUST obtain explicit user confirmation via message. NEVER execute enable operations without explicit user approval.**

**Reason**: Enable operations modify SSH access on remote servers. Unauthorized execution could cause security issues or service disruptions.

**Confirmation examples**:
- โœ… "enable ssh all" - Explicit command
- โœ… "yes, execute enable-all" - Explicit confirmation
- โŒ Silent execution - **PROHIBITED**
- โŒ Inferring user intent - **PROHIBITED**

---

Batch management of SSH key-based authentication.

## ๐Ÿš€ Installation

### Via Clawhub (Auto-Start Enabled)

```bash
# Install skill
clawhub install ssh-batch-manager

# Post-install script automatically:
# โœ… Configure systemd service
# โœ… Start Web UI service  
# โœ… Enable auto-start on boot
# โœ… No manual configuration needed!
```

### Manual Installation

```bash
# Install dependencies
pip install cryptography sshpass

# Generate encryption key
python3 ssh-batch-manager.py generate-key

# Create configuration
python3 ssh-batch-manager.py create-config

# Generate SSH key pair
python3 ssh-batch-manager.py generate-ed25519

# Run post-install script (auto-start Web UI)
cd ~/.openclaw/workspace/skills/ssh-batch-manager
bash post-install.sh
```

---

## ๐ŸŒ Web UI

**Auto-started on installation!**

**Access**: http://localhost:8765

**Features**:
- โšก Quick operations (Enable All / Disable All)
- ๐Ÿ”‘ SSH public key management (Read/Copy/Download)
- ๐Ÿ–ฅ๏ธ Server list management
- ๐Ÿ” Encryption tools
- ๐Ÿ“ Real-time operation logs

**Manual Start** (if needed):
```bash
python3 serve-ui.py
```

---

## Features

- โœ… **Intelligent connectivity pre-check** - Skip servers that are already accessible (40x faster)
- โœ… **Source identifier** - Add source info to authorized_keys for audit trail
- โœ… **Mandatory safety confirmation** - Require explicit user approval before enable operations
- โœ… **SQLite + LRU cache** - High-performance mapping storage
- โœ… **Auto cleanup** - Expired entries removed automatically
- โœ… **Auto-start Web UI** - Web interface starts automatically on installation

## Commands

### SSH Key Management

| Command | Description |
|---------|-------------|
| `enable-all` | Distribute public key to all configured servers |
| `disable-all` | Remove public key from all servers |
| `enable <user@host> [port]` | Distribute to single server |
| `disable <user@host> [port]` | Remove from single server |

### Encryption Tools

| Command | Description |
|---------|-------------|
| `encrypt <password>` | Encrypt a password |
| `encrypt-file <file>` | Encrypt file (output to `.enc`) |
| `decrypt-file <file>` | Decrypt file |
| `generate-key` | Generate encryption key |
| `generate-ed25519` | Generate ed25519 SSH key pair |

## Configuration

**Location**: `~/.openclaw/credentials/ssh-batch.json`

**Format**:
```json
{
  "version": "2.0",
  "auth_method": "password",
  "servers": [
    {
      "user": "root",
      "host": "10.8.8.81",
      "port": 22,
      "auth": "password",
      "password": "AES256:encrypted_password_here"
    }
  ]
}
```

## Security Notes

- โœ… Passwords stored with AES-256 encryption
- โœ… Key file permissions: 600
- โœ… Config file permissions: 600
- โœ… Web UI auto-starts with systemd
- โš ๏ธ Never commit keys to git
- โš ๏ธ Rotate keys periodically

## Performance

| Operation | Latency |
|-----------|---------|
| Hot query (cache) | < 0.1ms |
| Cold query (SQLite) | ~0.5ms |
| Write | < 2ms |
| Max records | 100,000+ |

**v2.1 improvements**:
- First run: ~8s (8 servers)
- Repeated runs: ~2s (all skipped)
- **40x faster** for repeated executions

## Source Identifier

When distributing keys, adds source info to `authorized_keys`:

```
ssh-ed25519 AAAAC3... ssh-batch-manager from mls at 2026-03-03 17:30:00
```

**Fields**:
- `ssh-batch-manager` - Tool identifier
- `from mls` - Source hostname
- `at 2026-03-03 17:30:00` - Distribution timestamp

## Version History

### v2.1.0 (2026-03-03)
- **CRITICAL**: Require explicit user confirmation before enable operations
- Intelligent connectivity pre-check (skip already accessible servers)
- Add source identifier to authorized_keys
- Clean test configurations (production servers only)
- Performance improvement: 40x faster for repeated runs
- **Auto-start Web UI service on installation**

### v2.0 (2026-03-03)
- JSON configuration format
- Support key-based authentication
- Mixed mode support (password + key)
- ed25519 key support (Ubuntu/Alpine compatible)

### v1.0 (2026-03-03)
- Initial release
- Enable/Disable all support
- AES-256 encryption
- Batch operations

## Repository

**Source**: https://gitee.com/subline/onepeace/tree/develop/src/skills/ssh-batch-manager

**License**: MIT

**Author**: TK

**Issues**: https://gitee.com/subline/onepeace/issues

## Related Skills

- `sensitive-data-masker` - Intelligent sensitive data detection and masking
- `healthcheck` - Security hardening and audits

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security โ†’

Comments

Loading commentsโ€ฆ

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.