Remote Unix Terminal Key Mapping

It always hit me. When I ssh or telnet on a Unix server (regardless of its taste), it always correctly guesses the type of terminal I’m logging in from, and therefore the keyboard always acts “normally” ... i.e. The backspace key works.

But then, when I successfully logged in, he often guesses incorrectly about the type of terminal I'm using and does incorrect key mappings - especially for the backspace keyword, that is, I have to release:

stty erase ...

enter the command to fix it.

Do any Unix gurus know why this is happening?

+3
source share
3 answers

, , backspace , , , .

, stty - ~/.profile /etc/profile ( script, ).

.

+2

(ssh), , , , .

Telnet telnetd ( ), -.

, , telnetd, , (- stty erase '^H'). UNIX, , , /etc/profile, ~/.profile, ~/.bashrc, ~/.kshrc ..).

(, ~/.profile) stty erase 'X', X - .

, , , , -.

+1

SSH/telnet ?

SSH, / , .

I assume that the TERM environment variable is incorrectly set by your terminal software, for example. set to "vt100" when the terminal is configured to behave like xterm, etc.

0
source

All Articles