How to generate SSH key only for GitHub and not conflict with original key

Source: Internet
Author: User

3 generating the SSH public key$ ssh-keygen-t rsa-c "[email protected]"#ssh-keygen-t dsa-c "[Email protected]"
# 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, in your own directory, there is an. SSH directory that indicates success

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 at this time.

3.2 Then you can see it 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 [email protected]  4 Add SSH public key to GitHub

Open GitHub, find the account to add SSH, copy the idrsa.pub content into the key.

5 test is in effect

Use the following command to test

ssh-t [email protected]

When you see these things put in time, 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.Is you sure want to continue connecting (yes/no)?

When you see this content in place, the description succeeds.

Hi username!You've successfully authenticated, but GitHub does not provide shell access. Note:if The original key is RSA format key, we need to generate DSA Formate key

How to generate SSH key only for GitHub and not conflict with original 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.