Skip to content

dbraendle/ssh-wunderbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ‰ ssh-wunderbar

SSH engineering with wunderbar feeling!

Transform SSH chaos into organized infrastructure bliss. German precision meets developer happiness.


✨ Why ssh-wunderbar?

SSH configuration shouldn't be a chore. Whether you're managing 3 servers or 30, ssh-wunderbar makes it wunderbar:

  • πŸ”‘ Smart Key Management - Automatic key type detection (ED25519/RSA/ECDSA)
  • πŸ“‹ JSON-Driven Config - Your infrastructure as code
  • πŸš€ Modern CLI - Built like the tools you love (Docker, Git, npm)
  • πŸ—οΈ Atomic Operations - Everything works or nothing changes
  • πŸ‘₯ Team Ready - Share configs, onboard developers instantly
  • πŸ”„ Key Rotation - Security best practices made simple

πŸš€ Quick Start

# Get ssh-wunderbar
git clone https://github.com/your-username/ssh-wunderbar.git
cd ssh-wunderbar

# Interactive setup - choose what you want
./ssh-wunderbar

# Or directly setup a service
./ssh-wunderbar github

That's it! SSH management, made wunderbar! 🎯


πŸ› οΈ Features

🎭 Interactive & Non-Interactive

# Interactive menu
./ssh-wunderbar                              

# From configuration
./ssh-wunderbar github                       # GitHub SSH
./ssh-wunderbar myserver                     # Your custom server

# Non-interactive setup  
./ssh-wunderbar webserver 192.168.1.100 deploy 22

# Service management
./ssh-wunderbar --add-service prod 10.0.0.1 root 22 "Production server"
./ssh-wunderbar --setup-all                  # Configure everything
./ssh-wunderbar --list                       # Show all services

πŸ” Smart Key Management

  • Auto-Detection: Recognizes ED25519, RSA, ECDSA, DSA key types
  • Smart Naming: server_ed25519, server_rsa - always know what you have
  • Key Reuse: Use existing keys or generate new ones
  • Clipboard Import: Paste keys directly from other systems

πŸ—οΈ JSON-Driven Infrastructure

{
  "services": {
    "production": {
      "hostname": "prod.company.com",
      "user": "deploy", 
      "port": 22,
      "description": "Production server"
    },
    "staging": {
      "hostname": "staging.company.com", 
      "user": "deploy",
      "port": 2222,
      "description": "Staging environment"
    }
  }
}

πŸ”„ Advanced Operations

# Key rotation with cleanup
./ssh-wunderbar --rotate-keys production

# Remove services
./ssh-wunderbar --remove-service old-server

# Setup entire infrastructure
./ssh-wunderbar --setup-all

πŸ“‹ How It Works

1. Service Definition

Define your servers in services.json or add them interactively.

2. Key Selection

Choose from existing keys or generate new ones. ssh-wunderbar detects key types automatically.

3. Automatic Deployment

Keys are deployed via ssh-copy-id with connection testing.

4. SSH Config Generation

Clean, organized ~/.ssh/config entries with proper aliases.

5. Ready to Connect

ssh myserver  # Instead of ssh user@long-hostname.company.com

🎯 Use Cases

πŸ‘¨β€πŸ’» Individual Developer

# Quick server access setup
./ssh-wunderbar --add-service homelab 192.168.1.50 pi 22
./ssh-wunderbar homelab
# Now: ssh homelab 

πŸ‘₯ Team Onboarding

# Share your services.json with the team
git clone company-infrastructure-config
./ssh-wunderbar --setup-all
# Entire team has identical SSH access

🏒 Corporate Infrastructure

{
  "services": {
    "production-web": {"hostname": "web.prod.company.com", "user": "deploy"},
    "production-db": {"hostname": "db.prod.company.com", "user": "postgres"},
    "staging-web": {"hostname": "web.staging.company.com", "user": "deploy"}
  }
}

🏠 Homelab Management

Perfect for managing multiple Raspberry Pis, NAS systems, and home servers.


πŸ”§ Installation

Option 1: Git Clone (Recommended)

git clone https://github.com/your-username/ssh-wunderbar.git
cd ssh-wunderbar
./ssh-wunderbar --help

Option 2: Direct Download

curl -O https://raw.githubusercontent.com/your-username/ssh-wunderbar/main/ssh-wunderbar
chmod +x ssh-wunderbar
./ssh-wunderbar --help

Option 3: Add to PATH

# After cloning/downloading
echo 'export PATH="$PATH:/path/to/ssh-wunderbar"' >> ~/.zshrc
source ~/.zshrc
ssh-wunderbar --help

πŸ§ͺ Test Mode

Safe testing without modifying your real SSH configuration!

# Test without cleaning previous results
./test.sh myserver

# Test with clean slate  
./test.sh --clean myserver

# Add and test service
./test.sh --add-service testbox 192.168.1.100 pi 22
./test.sh testbox

What Test Mode Does

  • βœ… Isolated Environment: All files in test-output/
  • βœ… Mock SSH Keys: Generated for testing (not real keys)
  • βœ… Simulated Deployment: No actual server connections
  • βœ… Interactive Testing: You control all inputs
  • βœ… Operations Log: Complete audit trail
  • βœ… Preserved Results: Multiple tests accumulate

Test Results

test-output/
β”œβ”€β”€ operations.log          # Complete test log
└── .ssh/
    β”œβ”€β”€ config             # Generated SSH config
    β”œβ”€β”€ server_ed25519     # Mock private key
    └── server_ed25519.pub # Mock public key

🎨 Configuration

Default services.json

{
  "version": "1.0",
  "services": {
    "github": {
      "type": "git",
      "hostname": "github.com",
      "user": "git", 
      "port": 22,
      "description": "GitHub SSH authentication",
      "readonly": true
    }
  },
  "settings": {
    "default_key_type": "ed25519",
    "auto_backup_config": true,
    "cleanup_old_keys": false,
    "key_rotation_days": 365
  }
}

Adding Your Servers

# Interactive
./ssh-wunderbar
# β†’ Choose "Add new service"

# Command line
./ssh-wunderbar --add-service myserver 192.168.1.100 user 22 "My server"

# Manual editing
# Edit services.json and add your server definitions

πŸ›‘οΈ Security Features

  • Automatic Backups: SSH configs backed up before changes
  • Key Rotation: Generate new keys and clean up old ones
  • Atomic Operations: Changes are all-or-nothing
  • Permission Management: Proper file permissions set automatically
  • Connection Testing: Verify access before marking as complete

🚨 Troubleshooting

Command Not Found

# Make sure script is executable
chmod +x ssh-wunderbar

# Check path if installed globally
which ssh-wunderbar
echo $PATH

Key Import Issues

# Check key format
cat your-private-key | head -1
# Should show: -----BEGIN OPENSSH PRIVATE KEY----- or similar

# Verify key is valid
ssh-keygen -l -f your-private-key

Connection Problems

# Test direct connection first
ssh user@hostname

# Check SSH config
./ssh-wunderbar --list

# Verify key deployment
ssh-copy-id -i ~/.ssh/server_ed25519.pub user@hostname

Missing Dependencies

# ssh-wunderbar requires jq for JSON parsing
brew install jq          # macOS
apt install jq            # Ubuntu/Debian  
yum install jq            # RHEL/CentOS

🀝 Contributing

We love contributions! ssh-wunderbar is built with wunderbar community spirit.

Development Setup

git clone https://github.com/your-username/ssh-wunderbar.git
cd ssh-wunderbar

# Test your changes
./ssh-wunderbar --help

# Run with debug
bash -x ./ssh-wunderbar --list

Contribution Guidelines

  • πŸ§ͺ Test thoroughly - SSH access is critical
  • πŸ“ Document changes - Keep README updated
  • 🎯 Focus on UX - Make it more wunderbar
  • πŸ”’ Security first - Never compromise on safety

πŸ“„ License

MIT License - feel free to use, modify, and distribute!


πŸŽ‰ Philosophy

"Make It Simple"

Complex infrastructure shouldn't require complex tools. One command should do what used to take hours.

"Wunderbar Experience"

Tools should bring joy, not frustration. Every interaction should feel smooth and delightful.

"German Engineering"

Precision, reliability, and attention to detail. Built to work correctly every time.

"Community First"

Great tools are built by great communities. Your feedback makes ssh-wunderbar better.


❀️ Acknowledgments

Inspired by the amazing DevOps community and the need for better SSH management tools.

Built with ❀️ for developers who value their time and sanity.


🌟 Star History

If ssh-wunderbar made your SSH management wunderbar, consider starring the repo! ⭐

SSH engineering with wunderbar feeling! πŸ‡©πŸ‡ͺ⚑


Ready to make your SSH setup wunderbar?

git clone https://github.com/your-username/ssh-wunderbar.git
cd ssh-wunderbar  
./ssh-wunderbar

Wunderbar awaits! πŸŽ‰πŸš€

About

πŸš€ SSH engineering with wunderbar feeling! Modern CLI tool for SSH key management and configuration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages