Git SSH public key verification

Source: Internet
Author: User
Tags ssh port

All the following. Ssh directories are in the user's home directory ~

1. You need to enable pubkey verification for sshd_config on the server.

Pubkeyauthentication Yes
Authorizedkeysfile. Ssh/authorized_keys

2. Public Key file generated by the client through SSH-keygen

Run ssh-keygen directly to enter the password without entering it. Otherwise, the password will be required for verification. Isn't this just to save the need to enter the password ..

The default private key and public key are named under. SSH

Id_rsa id_rsa.pub

Import the content of the id_rsa.pub file to the user on the server ~ /. Ssh/authorized_keys

Cat id_rsa.pub> authorized_keys

3. You can create a config file in the client. Ssh directory.

Host localhost # server alias
Hostname 127.0.0.1 # Server IP Address
User user # login Username
Port 22 # ssh port number
Identityfile ~ /. Ssh/id_rsa # Private Key address

4. You can use SSH-T localhost to test whether it is successful. If you need to check the server response information, use SSH-Vt localhost.

However, the local test is stuck in sending env Lang,

You can actually log on through SSH.

5. Git uses SSH to push pull and you don't need to enter the password each time. This is the key.

Git SSH public key verification

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.