Skip to content

fix: implement persistent SSH key storage with key generation#163

Merged
michelroegl-brunner merged 4 commits intomainfrom
fix/ssh_keys
Oct 16, 2025
Merged

fix: implement persistent SSH key storage with key generation#163
michelroegl-brunner merged 4 commits intomainfrom
fix/ssh_keys

Conversation

@michelroegl-brunner
Copy link
Copy Markdown
Member

🐛 Fix: SSH Key Authentication Issues

Problem

  • SSH key authentication was failing with 'error in libcrypto' during script execution
  • Temporary key files were causing race conditions and corruption
  • Confusing 'both' authentication option was causing user confusion
  • No way to generate SSH keys within the application

Solution

  • Persistent Key Storage: Keys are now stored in data/ssh-keys/ directory
  • Key Generation: Added 'Generate Key Pair' button for automatic ED25519 key creation
  • Public Key Viewing: Added 'View Public Key' button with copy-to-clipboard functionality
  • Simplified Auth: Removed 'both' option, now only supports 'password' OR 'key'
  • Enhanced UX: Hide manual key input when key pair is generated
  • Database Migration: Added ssh_key_path and key_generated columns
  • API Endpoints: New endpoints for key generation and public key retrieval

Technical Changes

  • Fixed 'error in libcrypto' by eliminating temporary file race conditions
  • Added persistent SSH key file management with proper permissions (0600/0644)
  • Updated database schema with proper migrations
  • Enhanced UI/UX with conditional rendering and success feedback
  • Added comprehensive error handling and type safety

Testing

  • ✅ Build compiles successfully
  • ✅ All TypeScript errors resolved
  • ✅ Key generation and viewing functionality working
  • ✅ Copy-to-clipboard with fallback support

Resolves SSH authentication failures during script execution.

- Fix 'error in libcrypto' issue by using persistent key files instead of temporary ones
- Add SSH key pair generation feature with 'Generate Key Pair' button
- Add 'View Public Key' button for generated keys with copy-to-clipboard functionality
- Remove confusing 'both' authentication option, now only supports 'password' OR 'key'
- Add persistent storage in data/ssh-keys/ directory with proper permissions
- Update database schema with ssh_key_path and key_generated columns
- Add API endpoints for key generation and public key retrieval
- Enhance UX by hiding manual key input when key pair is generated
- Update HelpModal documentation to reflect new SSH key features
- Fix all TypeScript compilation errors and linting issues

Resolves SSH authentication failures during script execution
@michelroegl-brunner michelroegl-brunner merged commit 3459fe3 into main Oct 16, 2025
4 checks passed
@michelroegl-brunner michelroegl-brunner deleted the fix/ssh_keys branch November 13, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant