SSH Config Manager

v1.0.0

CLI tool to manage SSH config files, organize hosts, generate configs, and test connections.

0· 291·2 current·2 all-time
byDerick@derick001
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description match the code: the tool parses, edits, validates, backs up, and tests entries in ~/.ssh/config. One minor metadata inconsistency: the skill metadata lists no required config paths, yet the tool operates on ~/.ssh/config and creates ~/.ssh/backups; this should be declared but is proportionate to the stated purpose.
Instruction Scope
SKILL.md instructs the agent/user to run the included Python CLI which reads and writes the user's SSH config and can run ssh to test connections—this is within scope. Caution: generate/write operations can overwrite ~/.ssh/config (a backup is created), and connection testing invokes local ssh which will use the user's SSH keys and any directives in the config (e.g., ForwardAgent, ProxyCommand). The instructions do not tell the agent to read unrelated system files or exfiltrate data.
Install Mechanism
There is no install spec (instruction-only install) and the only required binary is python3 (plus the system ssh client). No remote downloads or obscure installers are used. The included code file is run locally.
Credentials
The skill requests no environment variables or credentials, and the code does not access secret env vars. However, it requires read/write access to ~/.ssh/config and will invoke the system ssh client (which can use your private keys/agent). This level of access is appropriate for an SSH config manager but is sensitive—templates or generated config content from untrusted sources could introduce malicious ProxyCommand or ForwardAgent settings.
Persistence & Privilege
The skill is user-invocable and not always-enabled. It creates files under ~/.ssh/backups and writes to ~/.ssh/config (its own scope). It does not modify other skills or global agent settings.
Assessment
This skill appears to do what it claims, but your SSH config and keys are sensitive. Before installing/using: (1) review scripts/main.py (you already have it) to confirm behavior; (2) run list/validate first and avoid immediate generate->write unless you inspect the generated output; (3) never feed untrusted templates or remote YAML into generate without reviewing for ProxyCommand, PermitLocalCommand, or ForwardAgent directives; (4) keep local backups (tool creates backups, but keep your own copy before major changes); (5) when using test, be aware it will run your ssh client (which can use your keys/agent); (6) if you need stronger guarantees, run the tool in a separate user account or container before applying changes to your real ~/.ssh/config.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

Binspython3
latestvk977t51cgqdy10j1jxc7ng0kp18241j2
291downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

SSH Config Manager

What This Does

A CLI tool to manage SSH configuration files (~/.ssh/config). It helps you organize SSH hosts, generate configurations, test connections, and keep your SSH config clean and maintainable.

Key features:

  • Parse and display existing SSH configs in readable format
  • Add/remove/edit hosts in your SSH config
  • Organize hosts with tags, groups, or categories
  • Test SSH connections to verify hosts work
  • Generate configs from templates or JSON/YAML input
  • Validate syntax to ensure config files are correct
  • Backup and restore your SSH config before making changes

When To Use

  • Your ~/.ssh/config file has become messy with dozens of hosts
  • You need to quickly test if SSH connections work
  • You want to share SSH configs with team members
  • You frequently switch between different environments (work/home/cloud)
  • You want to organize hosts by project, environment, or team
  • You need to validate SSH config syntax before applying changes

Usage

Basic commands:

# List all hosts in your SSH config
python3 scripts/main.py list

# Add a new host
python3 scripts/main.py add --host myserver --hostname 192.168.1.100 --user admin

# Test SSH connection to a host
python3 scripts/main.py test --host myserver

# Organize hosts by tags
python3 scripts/main.py organize --tag work --hosts server1,server2,server3

# Generate SSH config from YAML template
python3 scripts/main.py generate --template servers.yaml --output ~/.ssh/config

# Validate SSH config syntax
python3 scripts/main.py validate --file ~/.ssh/config

Examples

Example 1: List and organize hosts

python3 scripts/main.py list --format table

Output:

┌─────────────────┬──────────────────────┬───────────┬───────────────┐
│ Host            │ Hostname             │ User      │ Tags          │
├─────────────────┼──────────────────────┼───────────┼───────────────┤
│ github          │ github.com           │ git       │ git           │
│ work-server     │ 192.168.1.100       │ admin     │ work,prod     │
│ staging         │ staging.example.com  │ deploy    │ work,staging  │
│ personal-vps    │ 45.33.22.11          │ root      │ personal      │
└─────────────────┴──────────────────────┴───────────┴───────────────┘

Example 2: Add a new host with advanced options

python3 scripts/main.py add \
  --host new-server \
  --hostname server.example.com \
  --user ec2-user \
  --port 2222 \
  --identity ~/.ssh/id_rsa \
  --tag "aws,production" \
  --description "Production web server"

Example 3: Test multiple hosts

python3 scripts/main.py test --hosts work-server,staging,personal-vps

Output:

Testing SSH connections...
✅ work-server (192.168.1.100): Connected successfully
✅ staging (staging.example.com): Connected successfully
❌ personal-vps (45.33.22.11): Connection timeout

Example 4: Generate config from template

# servers.yaml
hosts:
  web-prod:
    hostname: web.example.com
    user: deploy
    port: 22
    identityfile: ~/.ssh/deploy_key
    tags: [web, production]
    
  db-backup:
    hostname: db-backup.internal
    user: backup
    port: 2222
    proxycommand: "ssh -W %h:%p bastion"
    tags: [database, backup]
python3 scripts/main.py generate --template servers.yaml --output ~/.ssh/config

Requirements

  • Python 3.x
  • SSH client installed (ssh command available in PATH)
  • Read/write access to ~/.ssh/config (or specified config file)

Limitations

  • This is a CLI tool, not an auto-integration plugin
  • Requires Python 3.x and SSH client to be installed
  • SSH config syntax validation is basic (doesn't catch all edge cases)
  • Connection testing requires SSH keys to be set up properly
  • Does not manage SSH keys or certificates
  • Limited to standard SSH config options
  • Performance depends on number of hosts in config
  • Network timeouts can affect connection testing
  • Does not support all SSH config advanced features (Match blocks, etc.)
  • Backup files use simple timestamp naming

Comments

Loading comments...