Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I ssh into another machine with Debian with my account(with sudo permissions), my backspace key generates some awkward symbols on pressing. Also Tab & del keys don't work too.

On the other hand, I also have another account on the same machine & when I ssh through this account, its terminal works perfectly fine. I couldn't figure out why is this happening.

share|improve this question
    
Could be a keyboard and text encoding issue, do they all use the same language and keyboard settings? –  Kevin Jul 15 '12 at 11:36
    
@Kevin How to check for that? –  gopi1410 Jul 15 '12 at 11:58
    
Occasionally mine does it too. But my backspace is acting like my return (Enter) key. @gopi1410, you're not the only one with this issue +1 for the question! –  Kevdog777 Aug 14 '12 at 13:57

3 Answers 3

I have seen such problems before.

Take the backspace for example, the remote host expects some character to be used as "erase/backspace" , while you pressing backspace in the terminal , the terminal program will send some character to the remote host, if what the remote host expects diffs with the characters sent by the terminal program, you would encounter this issue. So a quick fix is as below:

  1. run command #stty -a in the remote host, and find what is expected to be an erase code in the output. Say erase=^?.
  2. In the terminal, type Ctrlv and press your backspace. You'll see what code is sent as "erase". Say it is ^H.
  3. In the remote host, run #stty erase ^H.

You can fix the Tab issue with the same as above.

share|improve this answer
    
My backspace character is some special symbol something like an inverted triangle. So its not working –  gopi1410 Jul 16 '12 at 10:26

Your shell may be set to /bin/sh instead of /bin/bash

share|improve this answer

Beside "stty" solution, you may try the "TERM" solution.

You ssh to your Debian from some terminal (putty, solaris dterm, debain xterm, you-name-it), this termninal announce capabilities (which includes keys such as Backspace and Tab) via TERM environment variable.

So, after ssh to unix host (it doesn't depend debian it or other host) set the TERM variable according to your terminal. Consider you're using bash as shell and vt100 as terminal:

export TERM=vt100

ps: TERM should be announced via ssh automagically, but in some circumstances this magic fails.

share|improve this answer
    
still doesn't work :( –  gopi1410 Aug 14 '12 at 17:49
    
What terminal are you using? And what the value of TERM you have tried? –  paul Aug 15 '12 at 6:23
    
I tried vt100. How do I get to know the value of TERM? I tried ssh from cygwin (in windows) to Debian. If there are problems with cygwin, I even tried it from ubuntu terminal, but same problem. –  gopi1410 Aug 15 '12 at 12:30
    
Not sure cygwin has good terminal emulation, as far as I know, cygwin just using regular windows console which lacks terminal emulation (may be wrong). From ubuntu all should works just fine. Something wrong with shell or termcap library on debian. Login from Ubuntu and give me output of commands: 1. echo $TERM 2. stty -a –  paul Aug 16 '12 at 4:13
    
Well it works fine from my ubuntu machine, wonder why I hadn't verified it before.($TERM was 'xterm' there). So the problem is with cygwin only. Well anyways problem solved if it works with ubuntu :) –  gopi1410 Aug 16 '12 at 6:35

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.