Skip to content

regression: SetEnv TERM=xterm-256color back in ssh/config Host * after PR #50 #54

@stanfish06

Description

@stanfish06

Problem

PR #50 (merged May 11) removed SetEnv TERM=xterm-256color from the Host * catch-all in ssh/config as part of fixing the HPC username leak. However, commit af605023 ("fix ssh term") on the same branch re-added the line before the merge. The net effect is that the setting survived despite the stated goal of PR #50.

PR #53 (Copilot draft) attempted to remove it again but was closed without merging.

Current Host * block:

Host *
    ControlMaster auto
    SetEnv TERM=xterm-256color
    ControlPath ~/.ssh/controlmasters/%r@%h:%p
    ControlPersist 1800
    Compression yes
    TCPKeepAlive yes
    ServerAliveInterval 20
    ServerAliveCountMax 10

Why it's a problem

  1. Conflicts with tmux-256color setupTERM inside tmux is set to tmux-256color (PRs fix: tmux.conf hardcoded path, dead terminal setting, duplicate base-index #16, fix: remove dead xterm-256color settings surviving after PR #16 #22, fix: remove phone number from emacs signature, fix tmux template, fix nushell symlink path #34, fix: add default-terminal tmux-256color to Gentoo .tmux.conf #48). Forcing xterm-256color over SSH overwrites this for every SSH session, breaking true-color in neovim and other apps on the remote side.
  2. Silently ignored on HPC clustersSetEnv requires AcceptEnv TERM in the remote sshd_config. Most HPC clusters (greatlakes, bridges2) do not permit this, so the directive fails silently and adds noise.
  3. Originally removed intentionally — commit 57482bc in PR fix: remove HPC usernames and SetEnv TERM from ssh configs (regression from PR #39) #50 explicitly deleted this line.

Fix

Remove SetEnv TERM=xterm-256color from the Host * block in ssh/config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions