Linux Learning Note (vi)---Xshell connect the CentOS system via public key

Source: Internet
Author: User

Previously we connected the CentOS system remotely using the server-side username and password via SSH. This approach is not secure enough and it is recommended to use key authentication in order to improve the security of connection access.
The specific operation and configuration are as follows:
1. Create a key pair (public and private) in Xshell. Click the menu bar "Tools"--"New User key Generation Wizard"

2. Key type and key length can be maintained by default, click Next.

3. Generate the public key pair and click "Next".

4. Set the key name. You can also add a password to the key to improve security.

5. If the key does not set the password, the following window will pop up. Click "Yes" to continue.

6. Copy the following public key or save it as a file.

7. Close the window below to continue.

8. Create a hidden folder in the root directory. ssh/

9. Create the key file Authorized_keys under the. SSH folder and modify the permissions of the key file and the ssh file.


10. Copy the contents of the public key file created above into the key file. (Xshell use Ctrl+insert for copying, shift+insert to paste) save exit.

11. Create a new session, fill in the session name, host IP

    1. Click on "User Authentication" and select public key and user key. Fill in the user name again. If the key password is set above, enter the appropriate password here.
      1. Then you can connect.
      2. Normal no longer enter the password, you can connect directly.

        The Xshell is configured to connect to the remote server via the key.

Linux Learning Note (vi)---Xshell connect the CentOS system via public key

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.