In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to solve the linux ssh garbled problem". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to solve the linux ssh garbled problem".
Solutions to linux ssh garbled: 1, modify the environment variables of the linux server; 2, use remote login software to modify the configuration, and set the character coding to UTF-8.
This article operating environment: linux5.9.8 system, Dell G3 computer.
How to solve the linux ssh garbled problem?
Garbled code problem of SSH accessing linux
The solution of Chinese garbled Code in SSH Secure Shell Client
This is a deficiency that has not been solved by SSH Secure Shell Client for many years, requiring both client and server to have 'UTF-8' coding, while the Chinese version of Windows is non-UTF-8. Zh_CN.UTF-8 is the Chinese language environment encoded by UTF.
Windows uses GB2312 coding, while most linux systems support UTF-8 coding, while remote login uses local coding, so garbled code may occur. There are several solutions:
Solution 1: modify the environment variables of the linux server
With linux, there is a .bash _ profile configuration file in the user root directory, which is valid only for the current user. If valid for all users, modify the / etc/profile file
Use the ls-a command to view the file. After opening the file using the vi editor, add
LANG=zh_CN.GB2312export LANG
The Chinese language can be displayed normally. After changing the .bash _ profile configuration file, the contents of the file are as follows: (this is the method I used! )
# .bash _ profile# Get the aliases and functionsif [- f ~ / .bashrc]; then. ~ / .bashrcfi # User specific environment and startup programsPATH=$PATH:$HOME/binLANG=zh_CN.GB2312export PATHexport LANGunset USERNAME
Plan 2: or use other remote login software, and modify the configuration to set the character encoding to UTF-8.
PS: remote login software command line interface putty,Cterm,SecureCRT, including FTP function of Filezilla,Secure Shell Client, graphical interface of Xming,XShell,Xmanager, etc.
Let's take Putty and SecureCRT as examples.
Modify the SecureCRT settings: options (Options)-> session options (Session Options)-> appearance (Appearance)-> characters (Character), and select UTF-8.
Putty select Windows-- Translation on the left side of the configuration window, and select "UTF-8" in the Received data assumed to be in which character set drop-down list on the right.
+ +
Another article: the solution of Chinese garbled code in SSH Secure Shell Client
It is said that this is a deficiency that has not been solved by SSH Secure Shell Client for many years, requiring both client and server to have 'UTF-8' coding. Well, now I finally know that the coding of the Chinese version of Windows is non-UTF-8.
Does that mean I can't use this thing without changing the operating system?
As a result, there seem to be only two solutions.
1. Change the system.
2, using Putty: http://filezilla-project.org/download.php?type=client
Of course, if you need SFTP, you can use filezilla, which includes a small server-side and FTP functionality.
It's just a little bit of trouble to install.
Later found the fundamental solution, only know the method, do not know the reason.
# vi / etc/sysconfig/i18n
Change the content to
LANG= "zh_CN.GB18030" LANGUAGE= "zh_CN.GB18030:zh_CN.GB2312:zh_CN" SUPPORTED= "zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT= "lat0-sun16" Thank you for reading. The above is the content of "how to solve the linux ssh garbled problem". After the study of this article, I believe you have a deeper understanding of how to solve the linux ssh garbled problem. The specific use situation still needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.