fix: Synchronize SSH timeouts to 20s to prevent premature connection drops#1229
Open
eduardomozart wants to merge 5 commits intognmyt:mainfrom
Open
fix: Synchronize SSH timeouts to 20s to prevent premature connection drops#1229eduardomozart wants to merge 5 commits intognmyt:mainfrom
eduardomozart wants to merge 5 commits intognmyt:mainfrom
Conversation
This was referenced Mar 3, 2026
Removed readyTimeout from SSH options in buildSSHOptions function.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



📋 Description
Currently, SSH connections that require longer cryptographic handshakes (such as connecting to legacy equipment that utilizes slow DH GEX math) are failing prematurely. This is caused by mismatched timeout limits across the application stack:
server/routes/term.jsenforces a strict 5000ms (5-second) timeout for all incoming terminal WebSocket connections.ssh2library defaults to areadyTimeoutof 20,000ms (20 seconds).Because
ssh2was defaulting to 20 seconds, and the WebSocket router (term.js) was hardcoded to 5 seconds, the application was tearing down the session long before the 30-second wrappers injumpHostHelper.jsorConnectionService.jsever got a chance to finish waiting for those slow legacy handshakes.Because these limits are lower than the time it takes to negotiate some complex key exchanges, valid connections are being aggressively killed with a
Connection timeout, removing sessionwarning before the handshake completes.Changes
This PR synchronizes the SSH timeout limits across the stack to a standard 20 seconds (20,000ms), aligning them with the existing
ssh2library.server/routes/term.js: Conditionally increased thewaitForConnectiontimeout to 20,000ms specifically for thesshprotocol. Other protocols (liketelnetandpve-lxc) retain the fast 5000ms timeout.🚀 Changes made to ...
✅ Checklist
🔗 Related Issues
#1227