Skip to content

ssh-terminfo shell integration doesn't cache installation if connecting to IPv6 address #9251

Description

@mitchellh

Discussed in #9118

Originally posted by injust October 9, 2025

Issue Description

When SSHing to the same server via its domain or IPv4 address, Ghostty will remember that the terminfo has been installed by adding an entry to ~/.local/state/ghostty/ssh_cache.

However, when connecting via its IPv6 address, the file doesn't appear to be created/updated. This results in Ghostty attempting to install the terminfo file on every single connection.

Expected Behavior

Ghostty should use the ssh_cache file to prevent repeated terminfo installation attempts.

Actual Behavior

Ghostty tries to install its terminfo every time I SSH to a server using its IPv6 address.

Reproduction Steps

  1. SSH to a server via its IPv6 address (note the "Setting up xterm-ghostty terminfo on" output)
  2. SSH again
  3. Check ~/.local/state/ghostty/ssh_cache (it will not contain the IPv6 address)

Ghostty Logs

No response

Ghostty Version

Ghostty 1.2.2

Version
  - version: 1.2.2
  - channel: stable
Build Config
  - Zig version   : 0.14.1
  - build mode    : builtin.OptimizeMode.ReleaseFast
  - app runtime   : apprt.Runtime.none
  - font engine   : font.main.Backend.coretext
  - renderer      : renderer.generic.Renderer(renderer.Metal)
  - libxev        : kqueue

OS Version Information

macOS Sequoia 15.7.1

(Linux only) Display Server

None

(Linux only) Desktop Environment/Window Manager

No response

Minimal Ghostty Configuration

shell-integration-features = ssh-terminfo

Additional Relevant Configuration

No response

I acknowledge that:

  • I have reviewed the FAQ and confirm that my issue is NOT among them.
  • I have searched the Ghostty repository (both open and closed Discussions and Issues) and confirm this is not a duplicate of an existing issue or discussion.
  • I have checked the "Preview" tab on all text fields to ensure that everything looks right, and have wrapped all configuration and code in code blocks with a group of three backticks (```) on separate lines.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions