Broken SSH scrolling

There can exist incompatible terminal types between the local and remote computers on an SSH connection. The issue arises when trying to scroll in a text editor on the remote computer such as nano, emacs or vim among others. The text display would become all scrambled.

On the local SSH client PC, make the entries to the problem remote connection(s) as follows in the ~/.ssh/config file on your local PC.

Host myhost
    RequestTTY yes
    RemoteCommand export TERM=linux && bash
RequestTTY yes
opens a pseudo-terminal on the remote server, like the ssh -t option. If you have trouble, try RequestTTY force
this should normally have a && bash at the end of the command, assuming you want an interactive SSH session. Otherwise the remote server runs the command and immediately disconnects.