Rookie OPS Note: Manage your cloud host with Xshell on Windows

Source: Internet
Author: User
Tags file transfer protocol

If your PC is a Linux system, you can use SSH commands directly at the terminal. If it is a Windows system, then the SSH client will be used.

PS: The author dual system. Sometimes it's going to use Windows.

SSH client on Windows

There are several ways to log on to a remote host on Windows:

    • Putty
    • SecureCRT
    • Xshell
Putty Small, no installation, but not beautiful enough, rough work. SecureCRT I'm useless, under a seemingly charge, too lazy to find a crack, and SECURECRT does not support the file transfer protocol. Finally, try Xshell. Xshell Basic Configuration Login

Go directly to the official website. It's easy to download and install.

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

Enter a host name. Then click User Authentication on the left.



can remember the password!! you will not have to enter the user name and password every time you log in.

Color scheme

In the tool options on the menu bar, there is a color scheme. To open it, you can choose the delivery solution that comes with your system, or customize your distribution plan.

I myself have customized a black-bottom green word. Seems to be the "hacker Empire" in the "Hacker style color".

Note that the color scheme can only change the foreground (word) and background of the Xshell, while the colour of the file (such as the LS command) is determined by the remote host's configuration file.

Window Transparent

If you prefer a transparent background, then click, Tools-Options-view. Click to make the window transparent and adjust the transparency yourself.

Change the catalog file color

Before I changed the background to black, then if I use the LS command, then the directory color because it is dark blue, so the directory name will be very unclear. At this point we want to modify the color of the directory, it is necessary to modify the remote host configuration file, not Xshell configuration.

    • Vi/etc/dir_colors
    • Change dir 01;34 to 01;33 (yellow, which has the color corresponding parameter in front of the line). My on Line 81st (:: 81,81gg,81g can jump quickly)
    • . /etc/profile make configuration effective
Custom shortcut keys

Use later Xshell, found a little ointment, that is not support ALT and. The key combination. In traditional bash, you can automatically type the last parameter of the previous command by pressing the ALT +. Shortcut key. This is usually a very useful feature, especially when the last parameter of the previous command is very long: To make up for this, we click: Tools--Options--Keyboard and mouse--edit--new.

Then follow the prompts to press the key combination, Alt and.

Then select "Send string" in the "type" drop-down list, then enter!$ in "action"

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

This two-character bash special variable is the last parameter of the previous command referenced.

SSH Public Key Login

Previously we logged in using Xshell, which was logged in by user name and password. And because Xshell can remember the password, it can also realize the free input direct login. But sometimes this approach is unsafe, so you might prefer to log in with SSH's public key.

Generate Public key

Click the tool in the menu bar, and then open the user public Key Manager:


Click Generate, and then:

Here we choose the RSA algorithm. This algorithm is supported by SSH1,SSH2, and then the next step:

Here you can get the first key name. The following password is writable and can not be written. Next step:

Choose Save as file to save the public key to a folder in your PC. Remember the location of this file OH.

Configure on the remote host

Open Xshell. Click the window in the menu bar. Select new transfer file. A new session--sftp command prompt is then opened.

    • Type the LCD, and then open a Folder selection dialog box and select the folder you just saved with the public key.
    • Type put plus your public key name. For example put id_rsa_1024.pub (note that the public key is suffixed with. pub).


Log in to your remote host with a username and password.

In your home directory (or/root/if it is the root user), create a new folder . SSH, note that it starts with a dot.

Rename the above public key file to Authorized_keys and save it to the. SSH directory. Execute command:

Cat Id_rsa_1024.pub >>.ssh/authorized_keys
Note your current directory location.

New Public Key Logon session

In user authentication, select the appropriate option.

You can use it later, select the public key to log in.

Rookie OPS Note: Manage your cloud host with Xshell on Windows

Related Article

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.