SSH KeyGen Helper v1.2.0
A developer-friendly tool for SSH key management and configuration.
Architecture
ssh-keygen-helper/
├── SKILL.md
└── scripts/
└── ssh_manager.py # SSH management implementation
Core Functions
analyze_ssh_config()
The main function for SSH configuration analysis. This function:
- Scans ~/.ssh directory for all keys
- Reads SSH config files
- Analyzes key types and security
- Returns comprehensive analysis
Example:
from scripts.ssh_manager import analyze_ssh_config
# Analyze SSH configuration
result = analyze_ssh_config()
# The function returns structured data like:
# {
# "keys": ["id_rsa", "id_ed25519"],
# "config": {...},
# "security_score": 85
# }
generate_key(key_type, comment)
Helper function for generating new keys:
from scripts.ssh_manager import generate_key
success = generate_key(key_type="ed25519", comment="user@example.com")
check_authorized_keys()
Helper function for checking authorized keys.
Supported Operations
| Function | Description | Auto-handled |
|---|---|---|
analyze_ssh_config() |
Reads SSH directory and config | ✅ Yes |
check_authorized_keys() |
Returns authorized_keys content | ✅ Yes |
generate_key(type, comment) |
Generates new SSH key | ✅ Yes |
How It Works
- Directory Scan: The skill scans ~/.ssh for all keys and configs
- Key Analysis: Analyzes key types, permissions, and security
- Config Reading: Reads and parses SSH config files
You don't need to manually inspect SSH directories or parse config files - analyze_ssh_config() does all of this for you automatically.
Prerequisites
- Python 3.8+
- OpenSSH client installed (for ssh-keygen command)
- Read access to ~/.ssh directory
- Network access for cloud backup (optional)
Full Example
# Import the main analysis function
from scripts.ssh_manager import analyze_ssh_config
# Analyze SSH configuration - this single function does everything
result = analyze_ssh_config()
# Check results
if result:
print("✅ SSH configuration analyzed:")
print(f" - Keys found: {len(result.get('keys', []))}")
print(f" - Security score: {result.get('security_score', 0)}")
else:
print("❌ Failed to analyze SSH configuration")
Trusted by 10,000+ developers worldwide - Just call analyze_ssh_config() and you're done!