Log in to the Linux system using the Xshell tool key authentication

Source: Internet
Author: User

If you are a Linux operation, then the Linux Server system security issues, you may want to consider, and the system login method has two kinds, passwords and keys. Which one is more secure? Undoubtedly the latter! Here I share with you the way to log in to a Linux server using a key Xshell!

About Xshell, it is a powerful secure terminal emulation software that supports SSH1, SSH2, and the Telnet protocol of the Microsoft Windows platform. Similar tools are putty, SECURECRT and so on.

1, click the Xshell menu Bar tool, select the new User Key Generation Wizard, the key pair build operation.

2.

At this time, you have a pair of keys, you need to start setting up the configuration of the server, enable key authentication login, and for the sake of system security, the way to turn off password Authentication!

Vim/etc/ssh/sshd_config

Modify the following places:

Pubkeyauthentication Yes #启用PublicKey认证.

Authorizedkeysfile. Ssh/authorized_keys #PublicKey文件路径.

Passwordauthentication no #不适用密码认证登录.

3.

4.

Next, in the. SSH directory of the user's home directory where you need to log in, edit the Authorized_keys file to begin writing the public key of our generated key pair to this file.

Public key Viewing method: Click the Xshell Menu tool, select the user Key Manager, double-click the key you just generated open properties, select the public key, copy the contents of the public key, later use!

5. If you want to log in to the user's home directory without the. SSH directory, you can create a directory automatically by using the Ssh-keygen command to generate the server's own key mode.

6, then, modify the permissions of the file, or you may encounter problems!

7.

Now, login to test it! You will find that the password column is grayed out after entering the user!

Login successful, Configuration complete!

Log in to the Linux system using the Xshell tool key authentication

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.