开发者

Arrow keys turn into control characters in Telnet

开发者 https://www.devze.com 2023-04-01 01:07 出处:网络
I\'m in an Ubuntu terminal, and telnet to a server. Now whenever I type \'up\', it turns i开发者_StackOverflownto ^[[A. Other arrow keys also turn into control characters. Is there a way I can run tel

I'm in an Ubuntu terminal, and telnet to a server. Now whenever I type 'up', it turns i开发者_StackOverflownto ^[[A. Other arrow keys also turn into control characters. Is there a way I can run telnet so it understands my arrow keys? This would be a huge help because I'd like to scroll up in my commands history.


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.


I would either SSH into the server instead of telnet, or use puTTY.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号