Arrow keys turn into control characters in Telnet

前端 未结 2 469
臣服心动
臣服心动 2021-01-27 06:06

I\'m in an Ubuntu terminal, and telnet to a server. Now whenever I type \'up\', it turns into ^[[A. Other arrow keys also turn into control characters. Is there a way I can run

2条回答
  •  长发绾君心
    2021-01-27 07:02

    It's not telnet that needs to understand the escape sequences your keys produce; it's whatever program you're typing them into at the remote end. Looks like your $TERM environment variable (on the remote system) is not getting set correctly for the terminal you're running telnet in.

    It's been a while since I used telnet for logins, but IIRC it doesn't transfer TERM automatically, so you may have to set it yourself. Or, as Mike C suggests, use ssh instead -- that does transfer TERM.

提交回复
热议问题