Backspace, Tab, Del and arrow keys not working in terminal (using ssh)

EDIT: Reference: Mateng's answer

Mateng is close in that I think you're probably running Bourne Shell. But you shouldn't be editing your /etc/passwd file directly. Try using the chsh command instead:

chsh -s /bin/bash

The -s flag will make the new shell (Bash in this case) your login shell, going forward.


The following changes solved the problem for me. First, I checked which shell was running:

$ echo $0

which returned:

/bin/sh

As I read in this post in Ubuntuforums, changing the shell to /bin/bash brings the solution. So I edited my user settings in /etc/passwd to:

johndoe:x:1001:104:John Doe:/home/johndoe:/bin/bash

I logged out, then logged in again. Strangely, I had to switch the shell manually (maybe some cache was active) by entering this:

/bin/bash

Voila!
[The problem arose due to a distribution update.]


when you first ssh in, try these two commands

stty sane
export TERM=linux

I have to do this on some machines that I go into to fix exactly this problem