Skip to content

fix: resolve SSH tunnel failures with config profiles (#672)#675

Merged
datlechin merged 8 commits into
mainfrom
fix/ssh-tunnel-issues-672
Apr 11, 2026
Merged

fix: resolve SSH tunnel failures with config profiles (#672)#675
datlechin merged 8 commits into
mainfrom
fix/ssh-tunnel-issues-672

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

  • Support Include directive in SSH config parser — hosts defined in included files (e.g., ~/.ssh/config.d/*, OrbStack, Lima) now appear in the Config Host picker. Recursive parsing with glob patterns, circular include protection, and depth limiting.
  • Fix tunnel cleanup for profile-based connections — cleanup now uses effectiveSSHConfig(profile:) instead of reading inline sshConfig.enabled, preventing port leaks when SSH profiles are used.
  • Expand SSH config tokens (%d, %h, %u, %r, %%) in IdentityFile/IdentityAgent paths — previously stored literally, causing "file not found" errors.
  • Filter multi-word Host entries — entries like Host prod dev staging are now excluded from the picker to prevent DNS resolution failures.
  • Improve SSH handshake error messages — now shows detailed libssh2 error strings instead of numeric codes.
  • Log warning when SSH profile lookup fails — helps diagnose silent fallback to inline config.

Closes #672

Test plan

  • Verify ~/.ssh/config with Include config.d/* shows hosts from included files in Config Host picker
  • Verify SSH Profile-based connections create and clean up tunnels correctly
  • Verify IdentityFile %d/.ssh/key resolves to correct path
  • Verify multi-word Host prod staging entries don't appear in picker
  • Verify SSH handshake failure shows descriptive error message
  • Run SSHConfigParserTests and SSHPathUtilitiesTests (26 new test cases)

@datlechin datlechin force-pushed the fix/ssh-tunnel-issues-672 branch from 48bf7ea to 3d59e7c Compare April 11, 2026 16:55
@datlechin datlechin merged commit 3049cb2 into main Apr 11, 2026
2 checks passed
@datlechin datlechin deleted the fix/ssh-tunnel-issues-672 branch April 11, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSH Tunnel Not Working

1 participant