How to generate an SSH public key

Source: Internet
Author: User

1. Generating the public key

First check the native public key:

$ CD ~/.ssh

If prompted: No such file or directory indicates that you are using Git for the first time. If you are not using it for the first time, do the following to clean up the original SSH key.

$ mkdir key_backup$ cp id_rsa* key_backup$ RM id_rsa*

To generate a new key:

$ ssh-keygen-t Rsa-c "your email address"

In the carriage return you will be prompted to enter a password, which will be used when you submit the project, if it is empty, you do not have to enter the project.

You can find an. ssh file in your user folder under your native system disk, where the SSH key that you just generated is stored in the file.

2. Add a public key

Login to the Code platform, enter the user "account Settings", click on the right side of the column "SSH Public Key Management", click "Add Public Key", the public key just generated to fill in the "Public Key" column, and give it a name, save it.

Note : Do not copy extra spaces when copying the public key, otherwise the addition may not succeed.

I came across an item: Sometimes you need to create a new config file in your generated. SSH directory, and then write the user xxx

3. Managing the Public key

You can also delete or modify the public key in the account settings-SSH public Key management.

4. View the public key

Enter the name of the cat+ public key at the terminal, and enter to view the contents of the public key!

How to generate an SSH public 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: 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.