Ssh – Emacs ansi-term and term not working well when I ssh into a remote machine

emacssshterminal

I have the exact same Emacs configuration on a local and remote machine, and when I run M-x ansi-term or M-x term on each of them individually everything works great.

However, if I run any of these term emulators on Emacs on the local machine, and then I ssh into the remote machine, the prompt is not displayed correctly and my input doesn't work well either.

Any ideas what may be causing this?

Best Answer

The value of the TERM environment variable should be the same on both systems.

Related Question