Skip to content

fix(terminal): prefer host IP for SSH sessions#1455

Merged
simonjcarr merged 1 commit into
mainfrom
fix/terminal-ssh-error-details
May 17, 2026
Merged

fix(terminal): prefer host IP for SSH sessions#1455
simonjcarr merged 1 commit into
mainfrom
fix/terminal-ssh-error-details

Conversation

@simonjcarr
Copy link
Copy Markdown
Collaborator

Summary

  • prefer a useful recorded host IP when opening backend SSH terminal sessions
  • keep hostname as a fallback when no useful IP is available
  • show clearer SSH connection failure messages for DNS, refused, timeout, and unreachable errors

Validation

  • go test ./apps/ingest/internal/handlers ./apps/ingest/internal/db/queries
  • git diff --check HEAD

@simonjcarr simonjcarr merged commit 1388ea3 into main May 17, 2026
19 checks passed
@simonjcarr simonjcarr deleted the fix/terminal-ssh-error-details branch May 17, 2026 07:06
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f004e884e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +88 to +89
if useful := FilterHostIdentityIPs(ipAddresses); len(useful) > 0 {
return useful[0]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve fallback targets when choosing SSH host

Returning only useful[0] makes terminal connection success depend on the first reported IP, with no retry to hostname or other candidate IPs. For multihomed hosts (for example IPv6 reported before IPv4, or VPN/LAN address ordering), the first IP can be unreachable from ingest, and openSSHSession then performs a single ssh.Dial to that literal address and fails even though another recorded address (or the hostname) would work. This is a regression from the previous hostname-first behavior and can block terminal access for affected hosts.

Useful? React with 👍 / 👎.

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.

1 participant