Regarding the SSH issue (if anyone else reading this had the same):
Certain CLI tools complain about unknown $TERM env vars. For example, I could not open vim when SSHing into my Hetzner VPS in Ghostty. The fix is to set TERM to some well-known alternative before running your tool, like so: TERM=xterm vim