This is taken from Nano/vim in SSH session respond with "Error opening terminal: alacritty." and other weird things. #3360 which then turned out to avoid the other E558: Terminal entry not found in terminfo
as well.
Run:
TERM=xterm-256color
if you are already on the server.
Run:
TERM=xterm-256color ssh
if you want to make an environment variable already on your local machine that you want to pass to any ssh
command.
Mind that you will use the terminal "xterm" then, which has less features than Alacritty. I use the xterm only for htop
and top
commands and other commands that do not accept Alacritty and throw 'alacritty': unknown terminal type.
If you want to use Alacritty afterwards again, for example for the nice mouse-based copy feature so that you can copy more text than just what can be seen in the terminal page, see How to copy a large terminal history from Alacritty to the system so that I can search and document - the clipboard seems to get cut, change back to:
TERM=alacritty
I also get other terminals listed when I open a file in vim, mind that this is a legacy server.
Available builtin terminals are:
builtin_amiga
builtin_beos-ansi
builtin_ansi
builtin_pcansi
builtin_win32
builtin_vt320
builtin_vt52
builtin_xterm
builtin_iris-ansi
builtin_debug
builtin_dumb
defaulting to 'ansi'
Thus, you might try those on your server, for example with the one to which it should default anyway:
TERM=ansi
Not all of the terminal names of the list work directly, for example, TERM=amiga
does not work for me although it is built-in.