Connect to GIT through SSH authentication

Source: Internet
Author: User
Connect to GIT 1 through SSH authentication. there are multiple methods for connection permission authentication to connect to the GIT server to obtain or submit information, mainly including 1. each developer creates an account. 2. SSH public key authentication. 3. centralized authorization, and then the same as SHELL access .... Information & nbsp; | & Connect to GIT 1 through SSH authentication. there are multiple methods to connect to the GIT server for permission authentication to obtain or submit information, including 1. each developer creates an account. 2. SSH public key authentication. 3. centralized authorization, which is then the same as SHELL access. Www.2cto.com 2. generate a public key for convenient use (that is, do not use an account or something). all our projects use the SSH public key for authentication,
So our first step is to generate a public key. Command: ssh-keygen-C "maoxiang@pachiratech.com"-t rsa execution and output results: www.2cto.com [root @ localhost. ssh] $ ssh-keygen-C "xxx@qq.com"-t rsaGenerating public/private rsa key pair. enter file in which to save the key (/root /. ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in/root /. ssh/id_rsa.Your public key has been saved in/root /. ssh/id_rsa. Pub. the key fingerprint is: d2: 5f: a7: c4: fa: 66: 1d: b8: 64: 49: 31: 03: e5: d8: 3b: 6exxx@qq.comThe key's randomart image is: + -- [RSA 2048] ---- + |. o. | ++ |. o + | .... |. s. * o. | .. = +. | ooEo. | o +. | o. | + --------------- + [root @ localhost. ssh] $ lsid_rsa id_rsa.pub [root @ localhost. ssh] $ After executing this command, go to/root /. the ssh/directory contains two files, namely the private key and public key files, which are known as keypair in English. Next, you only need to add the public key files in these two files to the authorized_keys file of the GIT User (this step can send the file to the GIT administrator ). After that, you can connect to the remote GIT server through SSH authentication. That is, you can directly execute git-related commands.
Related Article

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.