@shinyaz

Ghostty SSH input issues are caused by missing terminfo on the remote host

1 min read

When I SSH'd into Ubuntu from Ghostty, backspace didn't work and cursor movement was broken. Turns out the remote host didn't have the xterm-ghostty terminfo installed. Ghostty sets TERM=xterm-ghostty by default, and without the matching terminfo on the remote side, terminal control sequences get misinterpreted.

Adding this to the Ghostty config fixes it automatically on SSH:

~/.config/ghostty/config
shell-integration-features = ssh-terminfo,ssh-env

Here's what each option does:

  • ssh-terminfo — Automatically installs the xterm-ghostty terminfo on the remote host during the first SSH connection
  • ssh-env — Falls back to TERM=xterm-256color if the terminfo installation fails

With both set, hosts that accept the terminfo get native support, and the rest gracefully fall back to xterm-256color.

Share this post

Shinya Tahara

Shinya Tahara

Solutions Architect @ AWS

I'm a Solutions Architect at AWS, providing technical guidance primarily to financial industry customers. I share learnings about cloud architecture and AI/ML on this site.The views and opinions expressed on this site are my own and do not represent the official positions of my employer.