Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When I try to ssh into one of my servers using this terminal I get the following:

  missing or unsuitable terminal: xterm-ghostty
  Connection to xxx.xxx.xxx.xxx closed.
(IP address removed by me.)

It turned out that this is associated with how I automatically run tmux by having the following kind of config for how I connect to that server.

  Host server3000
   IdentityFile ~/.ssh/host_specific/foo/bar/server3000/id_ed25519_baz
   RequestTTY yes
   RemoteCommand /usr/bin/env tmux new-session -A -s '%L'
Whereas if I outcomment the RemoteCommand setting in my ~/.ssh/config of the laptop I'm connecting form, I can connect fine even using Ghostty as my terminal and from

  env | grep ^TERM=
I get output

  TERM=xterm-256color
in the initial normal shell.

And if I run tmux, then inside of it from

  env | grep ^TERM=
I get output

  TERM=tmux-256color
So there seems to be some termcap stuff I'd have to figure out if I want to use Ghostty and still be able to run tmux automatically in the way I'm currently doing without problem when using the Terminal that ships with macOS and ssh'ing into my servers.



Thank you. I’ll probably go with sticking their suggestion into my ssh client config

  SetEnv TERM=xterm-256color
mentioned in the end of your link. I’ll put it next to the line where I set RemoteCommand and include a comment for myself that this SetEnv is for being able to still use RemoteCommand tmux thing even when using Ghostty.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: