Git SSH Key settings and gitsshkey settings

Source: Internet
Author: User

Git SSH Key settings and gitsshkey settings
I wanted to write an article about SSH, mainly about Git SSH. However, I found that many articles have been well written. You can refer to the "references" below ".

Here is a simple record (for Mac), Git SSH Key settings, for your own memo.

1. generate an SSH key

If ~ /. There is no key under the ssh directory (for example, id_rsa and, which must be generated.

$ ssh-keygen [-t rsa] [-C “”]

-T and-C parameters are not required.

Enter the storage location and password (not required) as prompted.

2. copy and paste all contents of the public key (. pub) File

This is a simple method I just learned.

$ pbcopy < ~/.ssh/

Then, press the paste shortcut key to paste the file.


Generate an SSH Public Key (Pro Git)

Generating SSH Keys (GitHub Help)
Add SSH keys (keyboardOTA) to the github account)
Allow two linux machines to use ssh without the user name and password (kongqz)
SSH (Baidu encyclopedia)

Document Information

  • Copyright statement: Free Reprint-non commercial-Non derivative-keep the signature | Creative Commons BY-NC-ND 3.0
  • Http://
  • Last modification time: July 20, 2014

How to create an ssh-key

The ssh method is required for downloading code using repo git. Currently, the password method is not supported for downloading code, and only the ssh-key method is supported, users who need to download the code should generate an ssh-key locally according to the following method, and then send the corresponding certificate file to the moderator or administrator. After obtaining the permission to download the code, they can download it directly; set the access permission. The new git library adopts the certificate authentication method. Please run the following command on your local machine: # ssh-keygen will enter the information in ~ /. Generate the file and id_rsa file under the ssh directory. Please send the file to me (moderator ). Then, use the id_rsa certificate when using ssh. The generated ssh certificate is automatically provided when linux and MacOS log on via ssh. On windows, you can use xshell or putty to create a certificate. Currently, no password is provided for logon.

How do I create a Linux ssh key file for logon, and how do I set it for logon users?
User1 (client) user2 (server)
Generate key
User1 $ ssh-keygen-t rsa
User1 $ ls/home/user1/. ss
Private Key Public Key ================ Import
User1 $ ssh-copy-id-I/home/user1/. ssh/ user2@
User1 $ ssh user2@

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.