Cainiao O & M notes: Use Xshell to manage your VM instances on Windows

Source: Internet
Author: User

Cainiao O & M notes: Use Xshell to manage your VM instances on Windows
If your PC is a linux system, you can directly use the ssh command on the terminal. For Windows systems, the ssh client is required.
PS: the author's dual system. Sometimes Windows is used.
There are several ways to log on to a remote host using the ssh client on Windows:
PuttySecureCRTXshell putty is compact and does not require installation, but it is not beautiful enough and does a rough job. I am useless to SecureCRT. The next protocol seems to be charged, so I am too lazy to crack it, And SecureCRT does not support file transfer. Try Xshell. Xshell basic configuration Logon

Go to the official website. Download and installation are simple.

After the installation is complete, open it and you will be prompted to create a session:

Enter the host name. Click User Authentication on the left.

Remember the password !!You do not need to enter the user name and password for each login.

Color Scheme

The color scheme is available in the tool options on the menu bar. Click it, and you can choose the delivery solution that comes with the system, or customize the delivery solution.

I have customized a black green character .. It seems to be the Hacker style color in the matrix "..

Note that the color scheme can only change the foreground (Word) and background of Xshell, and the color of the files in the scheme (such as when the ls command is run) is determined by the configuration file of the remote host.

Transparent window

If you like transparent background, Click Tools> Options> View. Click to make the window transparent and adjust the transparency.

Change directory file color

Previously, I changed the background to black. If I use the ls command, the directory color is dark blue, so the directory name is unclear. To modify the directory color, modify the remote host configuration file instead of the Xshell configuration file.

Vi/etc/DIR_COLORS: Change DIR 01; 34 to 01; 33 (yellow, marked with a color parameter before this line ). // My 81st rows (: 81, 81gg, 81G can be quickly redirected)./etc/profile make the configuration take effect

Last display effect: (right-click to view the image and view the big image)

Custom shortcuts

After Xshell is used, the combination of Alt and. is not supported. In traditional Bash, press the [Alt +.] shortcut key to automatically enter the last parameter of the previous command. This is usually a very practical function, especially when the last parameter of the previous command is very long .. To make up for this problem, choose tools> Options> keyboard and mouse> Edit> New.

Press the combination key, Alt and.

Select "Send string" in the "type" drop-down list, and enter it in "operation! $

Don't be surprised, that is, let the key combination automatically type these two characters. If you try it, you will find that what it achieves is what you want.

The bash special variable is the last parameter referenced in the previous command.

By the way!

If you want to automatically complete the first parameter of the previous command, use it! ^

SSH Public Key Logon

Previously, we used Xshell to log on by using the user name and password. In addition, because Xshell can remember the password, it can also achieve direct login without entering. However, this method is sometimes insecure, so you may prefer to log on with the SSH public key.

Generate public key

Click the tool in the menu bar and then open "user public key manager ":

Click Generate, and then:

Here we select the RSA algorithm. This algorithm is supported by both ssh1 and ssh2, and the next step is to continue:

Here you can use the first key name. The following password can be written or not written. Next step:

Select save as a file and save the public key to a folder in your PC. Remember the location of this file.

Configure on remote host

Open Xshell. Click the window in the menu bar. Select New Transfer file. A new session-sftp command prompt will be started.

Type LCD. In the displayed folder selection dialog box, select the folder where your public key is saved. Type put and add your public key name. For example, put id_rsa_1024.pub (note that the public key is suffixed with. pub ).

Log on to your remote host using your username and password.

In your home directory (for root users,/root/), create a folder. SshNote that it starts with a vertex.

Rename the above public key file as authorized_keys and save it to The. ssh directory. Run the following command:

 

cat id_rsa_1024.pub >>.ssh/authorized_keys
Pay attention to the location of your current directory.

 

Create a public key logon session

In user identity authentication, select the corresponding option.

You can use the public key to log on later.

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.