RSA key: How to log in directly to a Linux server by generating a key.

Source: Internet
Author: User

Whether you generate public key via Puttygen on Windows or the Ssh-keygen command on Linux, you cannot use it directly in the other's environment. This is the main reason I wrote this blog. is to explain how to translate into a format that the other person can recognize.

One, the first method: the use of Ssh-keygen

1. Use Ssh-keygen. Execute the command on Linux:

Ssh-keygen 1024x768 -t RSA

2. The default is to generate two files under $home/.ssh/:

Id_rsa  id_rsa.pub

3. Change the id_rsa.pub to Authorized_keys, then modify the permission to 600.

[Email protected]. SSH CP id_rsa.pub Authorized_keys[[email protected]. SSH chmod  Authorized_keys

4. Open another file with the VI editor, ID_RSA (private key). Copy the content and save it on the desktop with a TXT file. Then import it with Puttygen.


Note Modify the "number of bits in a generated key:" to 1024. Since we used the Ssh-keygen command earlier, we already indicated 1024.

5. Save as private key, rename, the next time you start putty, select the auth under SSH. In the private key file for authentication, find the location of the private key. Can be directly logged in.

Second, use Puttygen to generate the key.

Third, from the perspective of RSA Technology analysis of the two tools of the same and different. In order to find a more convenient way.

RSA key: How to log in directly to a Linux server by generating a key.

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.