Fixing 'alacritty': unknown terminal type. in ssh session

The Problem

You are using Alacritty terminal and you have logged into a remote host via ssh and when you try to type a command like clear it says this:

'alacritty': unknown terminal type.

The Solution

Just change your ssh command to TERM=xterm-256color ssh. That is, add an alias.

Edit your shell's RC file.

ZSH - ~/.zshrc

BASH - ~/.bashrc

alias ssh='TERM=xterm-256color ssh'

And source your shell's rc file.

source ~/.zshrc

You should be all set now