Mac – Unusual backspace behavior in Mac terminal

macsshterminalterminal.app

I'm trying to figure out how to get SSH sessions to work how I want using the terminal application on Mac OS X.

I'm used to using PuTTY on Windows, where backspace means backspace.

When I press delete/backspace on Mac it deletes the character following the cursor instead of the one before.

I turned on Delete sends Ctrl + H, and that works most of the time, but sometimes it just shows on the screen as ^H.
This is typically at prompts from some custom Python scripts on the box I log into. This doesn't happen with PuTTY on Windows.

BTW I'm logging into a Ubuntu Linux server running OpenSSH.

What do I need to do so that backspace is consistently backspace?

Best Answer

Running stty erase ^H should fix it, as that is the current control sequence being sent as a backspace.

Related Question