Linux Combat/SSH

Source: Internet
Author: User

SSH encoding

?? Today to discuss the SSH connection process, the local host and the remote host character set does not match when the problem of avoiding Chinese garbled.

Conventions

system Host name Character Set
CentOS Linux Release 7.0.1406 Centsos Gbk
Linux Mint 18.0 LTS Qwfys Utf-8
No parameter scenario
[email protected] ~ $ SSH [email protected]last Login:sat May 5 14:31:12 2018 from 112.10.209.123Welcome to Al Iyun Elastic Compute service! [[email protected] ~]# localelang=zh_cn.gbklc_ctype= "ZH_CN.GBK" LC_NUMERIC=ZH_CN. Utf-8lc_time= "ZH_CN.GBK" lc_collate= "ZH_CN.GBK" LC_MONETARY=ZH_CN. Utf-8lc_messages= "ZH_CN.GBK" LC_PAPER=ZH_CN. Utf-8lc_name=zh_cn. Utf-8lc_address=zh_cn. Utf-8lc_telephone=zh_cn. Utf-8lc_measurement=zh_cn. Utf-8lc_identification=zh_cn. Utf-8lc_all=[[email protected] ~]# [[email protected] ~]# Java-versionjava Version "1.8.0_161" Java (TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot (TM) 64-bit Server VM (build 25.161-b12, Mixed mode) [[Email pro           Tected] ~]# Java:java [-options] class [args ...]     (?)           java [-options]-jar jarfile [args ...] (? jar)?:-d32? 32λ ()-d64? 64λ ()-server? "Server" VM?    VM server,? -CP <?? Zip/jar >-classpath <??Zip/jar >:???, jar ZIP,-d<>=<?>??    -VERBOSE:[CLASS|GC|JNI]? -version Fen-version:<?>:??, δ??? Fen-showversion Fen-jre-restrict-search | -no-jre-restrict-search:??, δ Fen/? JRE-?    -help?    X??                  -ea[:<packagename>...|:<classname>]-enableassertions[:<packagename>...|:<classname>]    ??                  -da[:<packagename>...|:<classname>]-disableassertions[:<packagename>...|:<classname>]    ?? -esa |    -enablesystemassertions?? -DSA |    -disablesystemassertions?? -agentlib:<libname>[=<?>]? <libname>,-agentlib:hprof-agentlib:jdwp=help-agentlib:hprof=help-agentpath:<pathname>[=<?>]?                  -javaagent:<jarpath>[=<?>] Java, java.lang.instrument-splash:<imagepath> ?????, http://www.oracle.com/technetwork/java/javase/documentation/index.html[[email protected] ~]# Exit?C Onnection to Centsos closed.  [email protected] ~ $
With parametric scene
[email protected] ~ $ luit-encoding GBK ssh [email protected]last Login:sat May 5 14:34:06 2018 from 112.10.2 09.123Welcome to Aliyun Elastic Compute service!           [[email protected] ~]# java usage: Java [-options] class [args ...]           (execution Class) or Java [-options]-jar jarfile [args ...]                  (Execute JAR file) options include:-d32 use the 32-bit data model (if available)-D64 use the 64-bit data model (if available)-server Select the "Server" VM    The default VM is server because you are running on a server class computer.                  -CP < directory and Zip/jar file class search path >-classpath < directory and Zip/jar file class search path > with: Delimited directory, jar archive    And a list of ZIP archives to search for class files. -d< name >=< value > Set system Properties-verbose:[class|gc|jni] enable verbose output-version output product version and                  Exit-version:< value > Warning: This feature is obsolete and will be removed in a future release. The specified version is required to run the-showversion output product version and Continue-jre-restrict-search |                -no-jre-restrict-search Warning: This feature is obsolete and will be  Removed in future releases. Include/exclude user-specific JRE in version search-? -help output This Help message-X output non-standard option help-ea[:<packagename>...|:<classname>]-enableassertions[:&l    T;packagename>...|:<classname>] Enable assertion-da[:<packagename>...|:<classname&gt by the specified granularity;] -disableassertions[:<packagename>...|:<classname>] Disables assertion with the specified granularity-esa | -enablesystemassertions Enable System Assertion-DSA | -disablesystemassertions Disable system assertion-agentlib:<libname>[=< option;] Load Native Agent library <li Bname>, for example-agentlib:hprof see also-agentlib:jdwp=help and-agentlib:hprof=help-agentpath:<pathname& Gt [=<;] Load the native agent library by full pathname-javaagent:<jarpath>[=< option;] Loading the Java programming language proxy, please See java.lang.instrument-splash:<imagepath> using the specified image to display the splash screen For more information, see HTTP://WWW.ORACLE.COM/TECHN Etwork/java/javase/documentation/index.html. [[EMAIl protected] ~]# exit logout connection to Centsos closed. 
Summary

You can use the following command with SSH.

[email protected] ~ $ luit -encoding 字符集 ssh 用户名@远程主机

Reference documents

  • IBM Knowledge Center/meaix 7.2/luit command

Linux Combat/SSH

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.