# SSH Configuration ## ⚠️ Security Notice Never commit private keys to git! This directory contains only: - Example SSH config (sanitized) - Public keys (safe to share) - Setup scripts ## Setting up SSH on a new machine 1. **Generate new SSH keys** (if needed): ```bash # GitHub ssh-keygen -t ed25519 -C "your_email@example.com" -f ~/.ssh/github # General purpose ssh-keygen -t ed25519 -C "your_email@example.com" -f ~/.ssh/id_ed25519 ``` 2. **Restore SSH config**: ```bash cp ~/dotfiles/ssh/config.example ~/.ssh/config # Edit ~/.ssh/config to add your actual hostnames, users, and key paths ``` 3. **Set correct permissions**: ```bash chmod 700 ~/.ssh chmod 600 ~/.ssh/config chmod 600 ~/.ssh/*_key chmod 644 ~/.ssh/*.pub ``` 4. **Restore existing keys** (if you have encrypted backups): ```bash # Decrypt backup gpg -d ~/dotfiles/backups/ssh_[timestamp].tar.gz.gpg | tar -xzf - ``` ## SSH Config Best Practices - Use SSH key agent: `ssh-add -K ~/.ssh/your_key` - Use different keys for different services - Enable 2FA where possible - Regularly rotate keys ## Backup Strategy Run the backup script to create encrypted backups: ```bash ~/dotfiles/backup-scripts/backup-sensitive.sh ```