In MobaXterm, there exists an option to change the behavior of the backspace key. (answer below is based on MobaXterm personal v11.1)
The option is called: "Backspace sends CTRL-H"
The option is only shown in the session-specific configuration, not in the global settings: Create/edit a new/existing user session of type SSH in Moba, and access its settings. Under the "Terminal Settings" tab, uncheck "Backspace sends CTRL-H", save, and reload.
Can the behavior be changed for all sessions? I haven't figured out a way to change the behaviour globally yet. MobaXterm uses Putty code underneath, which does have a corresponding toggle setting for the backspace key behavior, but unfortunately that`s not exposed to the global settings window in MobaXTerm. Not in the free version anyways.
The professional version of Moba does offer a separate configuration tool which shows more config options to you. I suspect this might translate into a MobaXTerm.ini setting. I can't verify.
Alternative: change the behavior on the server
If you login with ssh <server>
from a local terminal not attached to any user session, the global setting applies -- which is to send ^H
. This causes some issues with editors, namely emacs, and anything else using readline like telnet. A workaround is to patch the terminal behavior on the remote site by issuing an stty command (on debian, this comes with package coreutils
):
# interpret incoming ^H as backspace/erase
stty erase \^H
I don't recommend adding this to ~/.bashrc if you login via other sorts of terminals, however. So the user-session config key is a better approach.