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