Linux problem Rollup---How to generate a key pair

Source: Internet
Author: User

Preparation: 2 machines, IP: 192.168.0.195 192.168.1.210
Purpose: Remote access via 195SSH 210. No Password required

1, first generate a key pair on 195.
#cd/root/.ssh
#ssh-keygen-t RSA
Generating public/private RSA key pair.
Enter file in which to save the key (/ROOT/.SSH/ID_RSA): (Direct carriage return)
Enter passphrase (empty for No passphrase): (direct carriage return)
Enter same passphrase again: (Direct carriage return)
Your identification has been saved In/root/.ssh/id_rsa.
Your public key has been saved in/root/.ssh/id_rsa.pub.
The key fingerprint is:
06:96:6b:56:0c:33:a4:24:16:8c:06:35:9b:98:8b:e7 [email protected]

2. Generate key pair Id_rsa and id_rsa.pub in Root/.ssh directory
Where Id_rsa is the private key, Id_rsa.pub is the public key.

3. Copy the public key directly to the 210/root/.ssh directory
#scp id_rsa.pub [email protected]:/root/.ssh

4. Rename the Id_rsa.pub on 210 machine to Authorized_keys
#cd/root/.ssh
#mv id_rsa.pub Authorized_keys

5. The key setting is successful. 195SSH Access 210 without password success
#ssh 192.168.1.210

It worked.

Linux problem Rollup---How to generate a key pair

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.