[PR #140] Fix SSH ED25519 key loading #209

Closed
opened 2025-11-20 04:13:31 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/community-scripts/ProxmoxVE-Local/pull/140

State: closed
Merged: Yes


Summary

This PR fixes several critical issues with SSH key handling and status checking:

🔧 SSH ED25519 Key Fixes

  • Fixed libcrypto error: SSH ED25519 keys now work properly by ensuring temporary key files end with a newline character
  • Fixed cleanup logic: Replaced with for directory cleanup to prevent EISDIR errors
  • Added timeout protection: SSH commands now have 30-second timeouts to prevent hanging connections

🔄 Status Check Improvements

  • Fixed endless loops: Removed problematic dependencies that caused continuous status checking
  • Added debouncing: Status checks are now debounced by 500ms to prevent excessive API calls
  • Better resource management: Added proper cleanup and prevented simultaneous status checks

🎯 UI/UX Enhancements

  • File upload support: Now accepts SSH keys without file extensions (Windows-generated keys)
  • Better key detection: Improved detection of OpenSSH format keys vs traditional PEM format
  • Enhanced error handling: Better error messages and validation for SSH key input

🧪 Testing

  • Tested with ED25519 keys generated on Windows (no extension)
  • Verified status checking no longer loops endlessly
  • Confirmed SSH operations complete successfully without resource leaks

📁 Files Changed

  • src/server/ssh-execution-service.js - Fixed key normalization and cleanup
  • src/server/ssh-service.js - Fixed key normalization
  • src/server/api/routers/installedScripts.ts - Added timeout protection
  • src/app/_components/InstalledScriptsTab.tsx - Fixed status check loops
  • src/app/_components/SSHKeyInput.tsx - Enhanced file upload and key detection

Resolves issues with SSH authentication failures and improves overall system stability.

**Original Pull Request:** https://github.com/community-scripts/ProxmoxVE-Local/pull/140 **State:** closed **Merged:** Yes --- ## Summary This PR fixes several critical issues with SSH key handling and status checking: ### 🔧 SSH ED25519 Key Fixes - **Fixed libcrypto error**: SSH ED25519 keys now work properly by ensuring temporary key files end with a newline character - **Fixed cleanup logic**: Replaced with for directory cleanup to prevent EISDIR errors - **Added timeout protection**: SSH commands now have 30-second timeouts to prevent hanging connections ### 🔄 Status Check Improvements - **Fixed endless loops**: Removed problematic dependencies that caused continuous status checking - **Added debouncing**: Status checks are now debounced by 500ms to prevent excessive API calls - **Better resource management**: Added proper cleanup and prevented simultaneous status checks ### 🎯 UI/UX Enhancements - **File upload support**: Now accepts SSH keys without file extensions (Windows-generated keys) - **Better key detection**: Improved detection of OpenSSH format keys vs traditional PEM format - **Enhanced error handling**: Better error messages and validation for SSH key input ### 🧪 Testing - Tested with ED25519 keys generated on Windows (no extension) - Verified status checking no longer loops endlessly - Confirmed SSH operations complete successfully without resource leaks ### 📁 Files Changed - `src/server/ssh-execution-service.js` - Fixed key normalization and cleanup - `src/server/ssh-service.js` - Fixed key normalization - `src/server/api/routers/installedScripts.ts` - Added timeout protection - `src/app/_components/InstalledScriptsTab.tsx` - Fixed status check loops - `src/app/_components/SSHKeyInput.tsx` - Enhanced file upload and key detection Resolves issues with SSH authentication failures and improves overall system stability.
saavagebueno added the pull-request label 2025-11-20 04:13:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE-Local#209