Linux Learning Summary (iii) Putty,xshell remote connection and key authentication Chapter

Source: Internet
Author: User
Tags putty settings

One: Putty download

1: Look for two places a. Download Putty B. Chiark greenend

2: Download the 32-bit zip package, which is a toolkit collection, not just a terminal tool

Two: Putty settings

1.hostname: Access the server's IP, the right port depends on the actual situation, the default 22

2 saved Sessions: give you this session a name, can be any, the next name automatically saved in the dialog box, select, load can choose your entire session configuration
3. Under WinDOS lines of Scrolballback turn the back number up like 2000
Represents the amount that the Putty window scrolls back to the page, indicating how many rows
4.windos-appearance-font settings-change Set font format, size
5.windos-translation set character display encoding format, we set to Utf-8, easy to display Chinese
6. Finally, under session, save the (save), open

Three: Secret key authentication

1. First use putty to generate a key pair (public key, private key)
A. Open the Puttygen.exe in the Putty package you just downloaded

Click Generate to generate the secret key pair.
Save private key to local, such as F:\linux\linux key, by clicking Save Private key
Copy the public key shown to be ready for use

2. On the server, put in the public key
Enter the following in the terminal
Mkdir/root/.ssh
chmod 700/root/.ssh only gives root user a maximum privilege
Note: chmod command followed by three digits, representing the owner, belong to the group, the other, each has RWX permission, corresponding to the number 421,421 to do the addition is 7
Vi/root/.ssh/authorized_keys
In the vi open Authorized_sys file, press I to enter edit mode, paste the public key just copied

Press Esc:wq
Re-enter Setenfoece 0 to turn off SELinux service
3. Enter putty to load the private key file
Open Putyy to load a previous session


Click on the left Ssh-auth to load the private key file according to the following interface

In the main screen will be saved open, and then login to see the connection is successful

Quad Xhell remote connection and key authentication
Xshell remote connection with putty basically consistent, host IP, font size, color, character encoding, scrolling cache can be their own
Find out, and Xshell have quick edit bar very convenient (second column)

Let me just say Xshell key authentication process
The first step is to generate the public key:
1. Open the tools-New User key Generation wizard

2. Next, next to this interface

3. Key name oneself one, key encryption password can not lose, next

4. Copy this public key to complete the shutdown
Step Two:
Also put the public key on the server, directly on the Authorized_keys we just built,
Separated from the public key of the previous putty, by using # Plus remarks to isolate
Step Three:
1.xshell Select the key to configure, login with key authentication
Select File-Open, select a created session, click Properties

2. Then click Connect-user authentication, in the right-hand method, select public key to select the key you just created in the user key bar

3. Then make sure that the connection can be

Strange, why Xshell didn't let us import the private key, I guess it is xhell inside not let us see the generated private key, but this connection process is certainly the private key decryption process. Let me briefly explain my understanding of this encryption.
If Tianxiaoxia to give Sun shaoping through the network to send her diary, this time she just learned the key authentication, digital signature, RSA algorithm and so on. The process is like this:
1: Sun shaoping with a computer to generate a pair of keys, the public key to Tianxiaoxia, Tianxiaoxia with the public key to encrypt her diary, and then sent to the small flat, less flat with their own private key to decrypt the diary. Wait, someone here will ask, Sun shaoping How to determine that he received a complete diary of Tianxiaoxia, rather than the network to tamper with the data sent to
2: So exactly involved in the process of digital signature, Tianxiaoxia self-generated a pair of keys, the first file of the encrypted file or digest information with their own private key encryption, and then the public key sent to less flat, so that less flat can confirm the identity of Xiao Xia, but also to ensure the integrity of the diary
3: In short, public key encryption, private key decryption, private key encryption, public key decryption. This key pair generation, based on the RSA algorithm, we see this in the process of Putty key authentication, although the public key and algorithm are public, but from the mathematical logic can not derive the private key from the public key, so security is very high

Linux Learning Summary (iii) Putty,xshell remote connection and key authentication Chapter

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.