Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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

share|improve this answer
Note that the "^H" is two characters that you have to type. In some older Unixes, the caret (^) has special meaning, so then you might need to put single or double quotes around those two characters. – Marnix A. van Ammers Apr 12 '10 at 3:56

Make sure the backspace character in the Unix system matches the one in your Mac. If you're using control-H for backspace in the Mac, then use that in the Unix system (stty erase "^H"). If you're using DELETE for backspace in the Mac (shows as "^?" when you do an "stty -a" command), then use that in the Unix system (stty erase "^?").

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.