Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

When I'm accessing one particular machine through ssh, the behavior of Backspace in vim changes. Instead of deleting chars, i have a ^? .

The problem is this machine acts as gateway and this problem is propagated when i'm accessing any machine behind this gateway (when I'm ssh-ing any of these machines inside the domain -without going through the domain-, i don't have this problem)...

This is not a big deal but it's really annoying.

Any idea ?

share|improve this question

migrated from Aug 28 '09 at 15:48

This question came from our site for professional and enthusiast programmers.

It's usually a mismatch between what's configured in you shell and what's configured in your terminal emulator.

Some use backspace (0x08), some use DEL (0x7f). If, from within your terminal session, you run

stty -a

you'll see a line like:

intr = ^C; quit = ^\; erase = ^?; kill = ^U; ...

That erase is the DEL character. You need to either configure your SSH to transmit that character or do a:

stty erase '^H'

to change the shell.

I know that Putty, for one, can change the character transmitted when you hit the backspace key. I think it's buried in the terminal section somewhere (at least in v 0.58) but I don't have Windows handy to check it.

However, it's not really programming-related so you may find this gets shifted over to

share|improve this answer
thanks... i knew it was not "really" programming-related but I didn't know from where the error stems. – LB Aug 28 '09 at 15:31
It's under Terminal->Keyboard->"The BackSpace Key" in case anyone is having trouble finding it – Katerberg Jan 11 '11 at 15:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .