Linux SSH security settings, and password-free login

Source: Internet
Author: User

First of all, about Linux remote login, a lot of students know, but also basic use of tools to connect. This is only about the Xshell configuration method.


As we all know, Xshell provides two kinds of authentication methods: Password Authentication, key authentication


Password most commonly used, today write a Xshell Set key authentication method login


The basic idea is to generate the key---> Configure the key into the server ~/.ssh/authorized_key file---> Configure the SSH client


First step: Generate a key


650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/36/wKiom1b53IiTsGGKAACRKJ90hms123.png "title=" 1.png " alt= "Wkiom1b53iitsggkaacrkj90hms123.png"/>

Select RSA encryption algorithm with a key length of 2048

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7E/32/wKioL1b53aWDvaJhAACBRHRx6ZE757.png "title=" 2.png " alt= "Wkiol1b53awdvajhaacbrhrx6ze757.png"/>

Choose Next to generate the key

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7E/33/wKioL1b53gGCoDVpAAB5psnnPfo073.png "title=" 3.png " alt= "Wkiol1b53ggcodvpaab5psnnpfo073.png"/>

After the next step to enter the key name, the recommended region-application-ip such as Shanghai-www-210 (want not to enter the password, you can not enter the password, the key name here must first change, save the file do not change the name)

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7E/35/wKioL1b58gLzZhtnAAB8RYDZtF0242.png "title=" 4.png " alt= "Wkiol1b58glzzhtnaab8rydztf0242.png"/>


Click Next to generate the key, which can be copied and then saved, or can be directly saved to a file, (if the previous step of the private key set the password, please remember, you need to enter the password, if you want to direct file import does not enter password login) direct point to complete.


Step two: Upload and configure

Upload the key file to/root/.ssh/

Cat Sh_www_210.pub >> Authorized_keys

The configuration takes effect.


Linux SSH security settings, and password-free login

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.