Windows client configures the SSH public key for GitHub

Source: Internet
Author: User

Check the settings for SSH keys
$ CD ~/.ssh/

If "No such file or directory" is displayed, skip to step three, otherwise continue.

Back up and remove the original SSH key settings

If a key file already exists, you need to back up the data and delete it

$ lsid_rsa  id_rsa.pub  known_hosts$ mkdir key_backup$ cp id_rsa* key_backup/$ rm id_rsa*
Generate a new SSH key

Enter the following code, you can generate a new key file, only need to use the default settings, when you need to enter the file name, the carriage return

$ ssh-keygen-t Rsa-c"your e-mail @qq.com"Generating Public/private RSA key pair. Enter fileinchWhich to save the key (/c/users/wx/.ssh/id_rsa): Enter Passphrase (empty forno passphrase): Enter same passphrase Again:your identification has been savedinch/c/users/wx/.ssh/Id_rsa. Your public key has been savedinch/c/users/wx/.ssh/id_rsa.pub.The Key fingerprint is:1d:cc:7e:b3:7e: the: f7:ab:c6: the: About: the: +: -: bc:8c your e-mail @qq.comthe key's Randomart image is:+--[RSA 2048]----+|     .         || o+    || +o +   ||        OE.O o.o| | S o O..+|| .            O. o| |           o....| |            . ooo | | o=. oo|+-----------------+
for no passphrase):  Here you can enter a password to verify at login

Add SSH key to GitHub

Using the text Editing tool to open the Id_rsa.pub file, if you do not see this file, you need to set the display hidden file. Accurately copy the contents of this file to ensure the success of the setup.
Click the Settings button on the GitHub home page, select SSH keys, paste the contents of the copy, then click the Add Key button to select the title.

Test it.

Enter the following command to test whether the setting is successful (first logon)

$ ssh-T [Email protected]the authenticity of host'github.com (192.30.255.112)'Can't be established.RSA Key fingerprint is -: -: Ac:a5: the: -: 2d: $: the: 1b: About: 4d:eb:df:a6: -. Is you sure want to continue connecting (yes/no)? Ywarning:permanently added'github.com,192.30.255.112'(RSA) to the list of known hosts. Enter Passphrase forKey'/c/users/dyf/.ssh/id_rsa': (If you need to enter a password in the previous step) Hi dyf007! You've successfully authenticated, but GitHub does not provide shellAccess.

Reference: http://codepub.cn/2015/06/02/Windows-client-configuration-of-SSH-public-key-on-GitHub/(Here are instructions for setting up multiple Sshkey)

Windows client configures the SSH public key for GitHub

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.