October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

SSH Backspace Not Working? Check TERM and the Remote Terminal Database

Backspace problems over SSH can involve a missing terminfo entry, a mismatched tty erase character, or one application’s key handling. Here’s how to tell which layer to check and how Ghostty users can fix a missing remote entry.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Backspace stops behaving correctly only after you connect over SSH, a mismatch between your terminal’s TERM value and the remote host’s terminfo database is one possible cause. It is not the only one: the key’s emitted character, the tty erase setting, and the application’s own key handling are separate parts of the problem.

First, find out where Backspace fails

Ask whether Backspace also misbehaves in your local terminal, or only after you SSH into a particular host. If it works locally but fails remotely, check the remote session’s terminal type and the host’s terminfo entry. If it fails locally too, the issue may be earlier in the input path.

As an Amazon Associate I earn from qualifying purchases.

Also note the scope: does the problem occur at the shell prompt, or only inside one full-screen program? If shell command-line editing works but a particular application does not, investigate that application’s terminal handling before changing shell-wide settings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

One technical blog describes the symptom as “After SSH-ing into a remote server, Backspace acts like Space,” and notes that arrow, Home, or End keys may also behave unexpectedly. Those are reported symptoms, not proof that terminfo is always at fault. [Ghostty terminfo documentation]

#1 Best Overall
Sale
Amazon Basics Wired QWERTY Keyboard, Works with Windows, Plug and Play, Easy to Use with Media Control, Full-Sized, Black
  • KEYBOARD: The keyboard works for Windows with hot keys that enable easy access to Media, My Computer, Mute, Volume up/down, and Calculator
  • EASY SETUP: Experience simple installation with the USB wired connection
  • VERSATILE COMPATIBILITY: This keyboard is designed to work with multiple Windows versions, including Vista, 7, 8, 10 offering broad compatibility across devices.
  • SLEEK DESIGN: The elegant black color of the wired keyboard complements your tech and decor, adding a stylish and cohesive look to any setup without sacrificing function.
  • FULL-SIZED CONVENIENCE: The standard QWERTY layout of this keyboard set offers a familiar typing experience, ideal for both professional tasks and personal use.

What TERM and terminfo do

TERM names the terminal type available to programs running in the session. Programs use the terminfo database to look up that terminal’s capabilities and how to interact with it. If the remote host does not have a suitable entry for the value in TERM, terminal-aware programs can misinterpret capabilities or report errors such as “Error opening terminal.” The Linux terminfo manual describes the database and terminal descriptions: terminfo(5).

SSH also carries terminal-related information for a session. The SSH connection protocol defines terminal modes, including VERASE, the erase-character setting: RFC 4254. That setting is distinct from the terminfo description. A correct terminfo entry does not guarantee that the tty’s erase character matches what your Backspace key sends.

Check the remote terminal type and entry

  1. Connect to the affected host and inspect the terminal type with echo "$TERM". The value identifies the terminal type the remote programs are being told to expect.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  2. Check whether the remote system recognizes that value with infocmp "$TERM". The infocmp utility displays a terminfo entry. If it cannot find a suitable entry, the remote database may not support the terminal type being sent.

    Rank #2
    Sale
    Logitech K120 Full Size Wired Keyboard USB Plug-and-Play Windows - Black
    • All-day Comfort: The design of this standard keyboard creates a comfortable typing experience thanks to the deep-profile keys and full-size standard layout with F-keys and number pad
    • Easy to Set-up and Use: Set-up couldn't be easier, you simply plug in this corded keyboard via USB on your desktop or laptop and start using right away without any software installation
    • Compatibility: This full-size keyboard is compatible with Windows 7, 8, 10 or later, plus it's a reliable and durable partner for your desk at home, or at work
    • Spill-proof: This durable keyboard features a spill-resistant design (1), anti-fade keys and sturdy tilt legs with adjustable height, meaning this keyboard is built to last
    • Plastic parts in K120 include 51% certified post-consumer recycled plastic*
  3. If the entry exists, do not assume the issue is solved: test the same key in the shell and in the affected application. A problem limited to one program points toward that program’s key handling or use of terminal capabilities.

For Ghostty, install its terminfo entry on the remote host

Ghostty documents that it uses xterm-ghostty as its TERM value. When the remote host lacks that entry, Ghostty’s documented installation command is:

infocmp -x xterm-ghostty | ssh YOUR-SERVER -- tic -x -

Replace YOUR-SERVER with the SSH destination you normally use. The command exports Ghostty’s local terminfo description, sends it over SSH, and compiles it on the remote host with tic. See the official Ghostty terminfo instructions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

After running it, verify that the entry is available with infocmp xterm-ghostty on the remote host. Depending on permissions and configuration, tic may write to the system terminfo database or to a user-local database such as ~/.terminfo. If the remote lacks tic, or you cannot install the entry where the session can find it, use a compatibility fallback instead.

Rank #3
Rii RK907 Ultra-Slim Compact USB Wired Keyboard for MAC and PC-Black(1PCS)
  • A plug-and-play USB connection with Low-profile keys give you a quiet, comfortable typing experience
  • Simple Wired USB Connection,You will enjoy a comfortable and quiet typing experience
  • The keyboard for business and office working is the budget-friendly keyboard that is built for longer use
  • Low profile keys for a more comfortable and quiet keystroke, desktop-centric design, splash resistant

Use xterm-256color as a compatibility fallback

Ghostty documents configuring SSH to send TERM=xterm-256color when connecting to a host without the xterm-ghostty entry. This common terminal type can provide a useful set of capabilities, but it is not identical to Ghostty’s own entry: Ghostty-specific features, including colored and styled underlines, may not work.

Ghostty’s example uses the SSH SetEnv option. OpenSSH requires version 8.7 or newer for this option. Follow Ghostty’s current terminfo guidance for the configuration example, and scope the setting to the host that needs the fallback rather than changing terminal behavior globally. Prefer installing the matching entry when you need Ghostty’s full terminal capabilities.

Ghostty’s +ssh wrapper

Ghostty’s documentation says its +ssh wrapper can attempt to install the terminal entry automatically. Installation is enabled by default for that wrapper; if it fails—for example, because tic is unavailable remotely—it falls back to TERM=xterm-256color. Availability depends on the Ghostty version you have installed, so check that version’s documentation before relying on the feature. A shell function wrapper also cannot automatically affect scripts or tools that invoke SSH outside that interactive shell. Details are in the Ghostty feature documentation.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the tty erase character separately

On the remote session, run stty -a and inspect the reported erase setting. The stty manual defines erase CHAR as the character that erases the last character typed: stty(1).

Rank #4
Sale
Logitech MK120 Full Size Wired Keyboard and Mouse Combo - Black
  • Durable and Reliable: This USB keyboard features a curved space bar, spill-resistant design (2), durable keys that can withstand 10 million keystrokes, and sturdy, adjustable tilt legs
  • Comfortable, Familiar Typing: You’ll enjoy a comfortable and familiar typing experience thanks to the deep-profile keys and standard layout with full-size F-keys and number pad
  • Full-size Sculpted Mouse: The high-definition optical USB mouse puts comfort and control in your hands with smooth, accurate tracking and an ambidextrous shape that feels good hour after hour
  • Simple Set-Up: Simply plug the keyboard and mouse into the USB ports on your desktop, laptop, or netbook and you're ready to work; compatible with Windows 7, 8, 10 or later
  • Clear and Convenient: The bold, bright white and long-lasting characters make the keys on this PC or laptop keyboard easy to read and extra durable

If the key’s emitted character does not match the tty’s erase setting, line editing can behave unexpectedly even when terminfo is present. Do not copy a universal stty erase value from another setup: conventions differ, and the right setting depends on what the key sends and what the application expects. Identify the mismatch before changing it.

Distinguish Backspace from Delete

Backspace and Delete are not interchangeable in every terminal and application configuration. Debian Policy discusses distinct Backspace and Delete behavior, including the role of stty erase and the terminfo kdch1 capability: Debian Policy, operating system interface. If one key fails while the other works, record which key and which application are involved before changing settings.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose a fix that matches the cause

Approach What it addresses Trade-off or requirement
Install the terminal’s matching terminfo entry Gives remote applications the description for the terminal type being sent For Ghostty’s documented method, the remote needs tic and permission or a usable user-local database
Use xterm-256color as a host-specific fallback Provides a common terminal description when the remote lacks xterm-ghostty Some Ghostty-specific capabilities may be unavailable; Ghostty documents SetEnv, which needs OpenSSH 8.7 or newer
Adjust the tty erase setting Addresses a mismatch between the key’s emitted character and the tty’s configured erase character Inspect stty -a first; the correct value depends on the setup
Investigate one application’s key handling Targets failures limited to a particular full-screen program or other application Changing shell or host-wide terminal settings may not address an application-specific issue

A practical troubleshooting order

  1. Compare local behavior with behavior after SSH, and identify whether the failure affects the shell, one application, or multiple programs.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  2. On the remote host, inspect TERM and try infocmp "$TERM" to check for a matching terminfo entry.

    Best Value
    Sale
    Lenovo 300 USB Keyboard, Wired, Adjustable Tilt, Ergonomic, Windows 7/8/10, GX30M39655, Black
    • The Lenovo 300 USB keyboard offers an intuitive and comfortable island key design with 2 5 zone layout including separate number pad
    • This full-size keyboard includes concaved key caps fitted for your fingertips
    • Spill resistant keys with a board drain help keep your PC keyboard protected and keep you productive
    • The complete ergonomic design includes an adjustable tilt to improve your typing comfort
    • OS independent – This convenient computer keyboard works with laptops desktops and any computer with a USB port
  3. If the entry is missing, install the matching terminal description when possible. For Ghostty, use its documented infocmp -x and remote tic -x - method.

  4. If installation is not practical, use a host-specific compatible terminal type, understanding that it may omit terminal-specific features.

  5. If the entry is present or the failure remains, inspect stty -a and test Backspace and Delete separately in the affected context.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

    Quick Recap

    SaleBestseller No. 1
    SaleBestseller No. 2
    Logitech K120 Full Size Wired Keyboard USB Plug-and-Play Windows - Black
    Logitech K120 Full Size Wired Keyboard USB Plug-and-Play Windows - Black
    Plastic parts in K120 include 51% certified post-consumer recycled plastic*; Product carbon footprint: 4.02 kg CO2e
    $12.39
    Bestseller No. 3
    Rii RK907 Ultra-Slim Compact USB Wired Keyboard for MAC and PC-Black(1PCS)
    Rii RK907 Ultra-Slim Compact USB Wired Keyboard for MAC and PC-Black(1PCS)
    Simple Wired USB Connection,You will enjoy a comfortable and quiet typing experience
    $9.99
    SaleBestseller No. 4
    Logitech MK120 Full Size Wired Keyboard and Mouse Combo - Black
    Logitech MK120 Full Size Wired Keyboard and Mouse Combo - Black
    Product carbon footprint: 5.03 kg CO2e
    $17.77
    SaleBestseller No. 5
    Lenovo 300 USB Keyboard, Wired, Adjustable Tilt, Ergonomic, Windows 7/8/10, GX30M39655, Black
    Lenovo 300 USB Keyboard, Wired, Adjustable Tilt, Ergonomic, Windows 7/8/10, GX30M39655, Black
    This full-size keyboard includes concaved key caps fitted for your fingertips; The complete ergonomic design includes an adjustable tilt to improve your typing comfort
    $13.39

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.