Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses issues in the SSH setup functionality by improving error handling and adding a fallback mechanism for server fingerprint acceptance. The key improvements include enhanced logging throughout the SSH connection process, implementing a secondary method using direct SSH connections when ssh-keyscan fails, and fixing a validation bug that previously allowed empty port numbers.
Key Changes:
- Added fallback SSH connection method when ssh-keyscan fails to retrieve server fingerprints
- Fixed port validation to prevent empty values from being accepted
- Enhanced logging and error reporting throughout the SSH setup workflow
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Resources.resx | Added new localized strings for enhanced logging messages and error reporting in SSH setup |
| SetupSshDialogWindow.xaml.cs | Added exception filter callback to capture binding validation errors for port field |
| SetupSshDialogWindow.xaml | Updated port TextBox binding to include exception validation and custom error filter |
| HostPortValidationRule.cs | Enhanced validation logic to reject empty port values and handle both string and integer inputs |
| SetupSshViewModel.cs | Added method to report binding exceptions and integrated validation error checking in command execution |
| SecureShellKeySetupService.cs | Implemented fallback SSH connection method for fingerprint acceptance and refactored fingerprint registration into separate methods |
| RemoteDebuggerLauncher.csproj | Added references to new infrastructure classes for pseudo console and string handling |
| PackageConstants.cs | Added constants for SSH executable and arguments used in fallback connection method |
| StringBuilderExtensions.cs | New utility class to strip ANSI/VT escape sequences from console output |
| PseudoConsoleProcess.cs | New class implementing Windows pseudo console for interactive SSH sessions |
| NativeMethods.cs | New class with P/Invoke declarations for Windows console and process creation APIs |
Files not reviewed (1)
- src/Extension/RemoteDebuggerLauncherUI/Resources.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…upSshViewModel.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…oleProcess.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2579f98 to
4a70396
Compare
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.
Fixes SSH Connection Issue: "Could not resolve hostname" #86