ubuntu12.04 在ssh线上机器之后,默认终端的上下左右键失效了,变成了这个,
[evans@app00-000 ~]$ ^[[A^[[A^[[A^[[A^[[A^[[C^[[C^[[B^[[A^[[D^[[C^[[A^[[A^[[A^[[D^[[B^[[C^[[A
,哪位大神可以帮忙啊 跪求 ~!!!!!!
伊谢尔伦2017-04-21 10:57:56
Use stty to set the terminal parameters.
If you don’t know how to set it up, just find a server with no problem, show the parameters, and you will know the difference by comparing the two servers.
阿神2017-04-21 10:57:56
Many people didn’t get the point. The presence of these characters indicates that there is nothing wrong with the terminal , but the program that accepts the keystrokes, the shell, does not understand the arrow keys correctly. Detect whether the shell is bash or zsh? If it is dash, the edit key is not supported. You can type bash and hit enter to see if that improves.
Usually knows what shell it is.ringa_lee2017-04-21 10:57:56
Change the character encoding of the local ssh tool, or change the ssh configuration file and change the character set. Or there is a cursor mode in the tool, just select it
高洛峰2017-04-21 10:57:56
@DonnieGo
It works normally when I type bash. I took a look at the file in /etc/passwd and found that the shell field is empty. I think this is the reason.
大家讲道理2017-04-21 10:57:56
@DonnieGo said: type bash and press enter
Solved!
To summarize the method once and for all:
Enter chsh
Enter /bin/bash after Login Shell [*]
Every connection will be ok in the future