Linux hosts generate key pairs

Source: Internet
Author: User

1. Overview
2. Build process
2.1 See if there is a. SSH directory
2.2 Creating the. SSH Directory
2.3 Generating a public key pair
2.4 Generate validation files and modify permissions
2.5 Summary

1. Overview

After the Linux system, the SSHD service will normally be launched to provide remote login.
The user can configure the SSH key login method to be more secure. The administrator can implement the password-free login management of the cluster via SSH key.
So you need to know how to generate a public key pair on Linux.

2. Build process 2.1 See if there is a. SSH directory

Linux systems typically install the SSHD service, but do not necessarily generate configuration directory/root/.ssh. If this directory does not exist, it can be created manually.

2.2 Creating the. SSH Directory

Administrators or users can create this directory manually. Note: the. SSH directory permission is

2.3 Generating a public key pair

Go to the. SSH directory and execute the command

Parameter meaning:

    • -t specifies that the encryption algorithm is RSA
    • -p Specifies the password for the key is Liwanliang
    • -f Specifies the name of the generated key file
2.4 Generate validation files and modify permissions

2.5 Summary

The above procedure is the process of generating a key pair under Linux.
After you write this public key to the/root/.ssh/authorized_keys of any remote host, you can log on to the remote host by using the key.
Any host, after obtaining the key Id_rsa, can log on to the host that is written to the public key id_rsa.pub.

Note: The premise is that each other network interoperability, port open, host does not refuse other network or security configuration.

Linux hosts generate key pairs

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.