[PR #140] [MERGED] Fix SSH ED25519 key loading #233

Closed
opened 2026-02-26 12:40:41 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE-Local/pull/140
Author: @michelroegl-brunner
Created: 10/14/2025
Status: Merged
Merged: 10/14/2025
Merged by: @michelroegl-brunner

Base: mainHead: fix/ssh_key


📝 Commits (1)

  • 9276a13 Fix SSH ED25519 key loading and status check loops

📊 Changes

5 files changed (+94 additions, -38 deletions)

View changed files

📝 src/app/_components/InstalledScriptsTab.tsx (+38 -10)
📝 src/app/_components/SSHKeyInput.tsx (+21 -5)
📝 src/server/api/routers/installedScripts.ts (+24 -16)
📝 src/server/ssh-execution-service.js (+8 -6)
📝 src/server/ssh-service.js (+3 -1)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE-Local/pull/140 **Author:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Created:** 10/14/2025 **Status:** ✅ Merged **Merged:** 10/14/2025 **Merged by:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Base:** `main` ← **Head:** `fix/ssh_key` --- ### 📝 Commits (1) - [`9276a13`](https://github.com/community-scripts/ProxmoxVE-Local/commit/9276a1392232f4a5194d3443864395f48f0ad9a0) Fix SSH ED25519 key loading and status check loops ### 📊 Changes **5 files changed** (+94 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `src/app/_components/InstalledScriptsTab.tsx` (+38 -10) 📝 `src/app/_components/SSHKeyInput.tsx` (+21 -5) 📝 `src/server/api/routers/installedScripts.ts` (+24 -16) 📝 `src/server/ssh-execution-service.js` (+8 -6) 📝 `src/server/ssh-service.js` (+3 -1) </details> ### 📄 Description ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 12:40:41 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE-Local#233
No description provided.