Home  >  Article  >  Development Tools  >  What is git's ssh?

What is git's ssh?

青灯夜游
青灯夜游Original
2021-11-30 11:40:138126browse

In git, the full name of ssh is "Secure Shell", which refers to the "Secure Shell Protocol". It is a protocol designed to provide security for remote login sessions and other network services; using the SSH protocol can effectively prevent Solve the problem of information leakage during remote management and make up for the loopholes in the network.

What is git's ssh?

The operating environment of this tutorial: Windows 7 system, Git version 2.30.0, Dell G3 computer.

SSH is a security authentication protocol, and Git is a version management tool.

1. What is ssh?

SSH is the abbreviation of Secure Shell (Secure Shell Protocol), which was developed by the Network Working Group of the IETF.

SSH is currently the most reliable protocol designed to provide security for remote login sessions and other network services.

Using the SSH protocol can effectively prevent information leakage during remote management and make up for loopholes in the network.

2. Key-based security authentication

When communicating using the ssh protocol, it is recommended to use the key-based authentication method. You must create a pair of keys for yourself and place the public key on the server you need to access. If you want to connect to an SSH server, the client software will make a request to the server to use your key for security verification. After the server receives the request, it first searches for your public key in your home directory on the server, and then compares it with the public key you sent. If the two keys match, the server encrypts the "challenge" with the public key and sends it to the client software. After the client software receives the "challenge", it can decrypt it with your private key and send it to the server.

3. SSH key generation

Under windows we can use Git Bash.exe to generate the key. Git Bash can be opened through the start menu or right-click menu

What is gits ssh?

git bash execution command, life public key and private key

ssh-keygen -t rsa

What is gits ssh?

After executing the command, generate the public key and private key with the following names under the window local user.ssh directory C:\Users\username.ssh:

What is gits ssh?

4 , ssh key configuration

After the key is generated, you need to configure the key locally on github for smooth access.
What is gits ssh?

What is gits ssh?

Add the contents of the id_rsa.pub file in the key section, and then click the "Add SSH key" button to complete the configuration.

Recommended study: "Git Tutorial"

The above is the detailed content of What is git's ssh?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn