SSH Public Key generated by github

Source: Internet
Author: User
1. if ssh is not installed, run the following command:


Sudo apt-get install ssh

2. Check the SSH public key.

Cd ~ /. Ssh

Check whether the. ssh file exists. If the file exists, move to the next step. If the file does not exist, go to the next step.


3. generate an SSH Public Key

$ Ssh-keygen-t rsa-C "your_email@youremail.com" # Creates a new ssh key using the provided email Generating public/private rsa key pair. enter file in which to save the key (/home/you /. ssh/id_rsa ):

Now you can see that there is a. ssh directory under your own directory, which indicates that it is successful.

3.1 enter the github Password

Enter passphrase (empty for no passphrase): [Type a passphrase] Enter same passphrase again: [Type passphrase again]

Enter the password you set on github.

3.2 and you can see in. ssh

Your identification has been saved in/home/you /. ssh/id_rsa. # Your public key has been saved in/home/you /. ssh/id_rsa.pub. # The key fingerprint is: #01: 0f: f4: 3b: ca: 85: d6: 17: a1: 7d: f0: 68: 9d: f0: a2: db your_email@youremail.com
4. Add the SSH public key to github.

Open github, find the account, add SSH, and copy the idrsa. pub content to the key.


5. Test effectiveness

Use the following command to test

Ssh-T git@github.com

When you see the content in, direct yes

The authenticity of host' github. com (207.97.227.239) 'Can't be established. RSA key fingerprint is 16: 27: ac: a5: 76: 28: 2d: 36: 63: 1b: 56: 4d: eb: df: a6: 48. are you sure you want to continue connecting (yes/no )?

When you see this content, it means it is successful.

Hi username! You 've successfully authenticated, but GitHub does not provide shell access.

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.