ubuntu - ssh 连上服务器之后,终端的上下左右键变成乱码,着急哦~~~!!
阿神
阿神 2017-04-21 10:55:56
0
8
1015

ubuntu12.04 在ssh线上机器之后,默认终端的上下左右键失效了,变成了这个,

[evans@app00-000 ~]$ ^[[A^[[A^[[A^[[A^[[A^[[C^[[C^[[B^[[A^[[D^[[C^[[A^[[A^[[A^[[D^[[B^[[C^[[A

,哪位大神可以帮忙啊 跪求 ~!!!!!!

阿神
阿神

闭关修行中......

reply all(8)
伊谢尔伦

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.

阿神

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.

大家讲道理

Use

Shift key + Delete key

Can be deleted and used temporarily

左手右手慢动作

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

大家讲道理

Type bash and press Enter, try again?

左手右手慢动作

Same request, I was so stupid when editing, so sad

小葫芦

@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.

大家讲道理

@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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!