To create a certificate login:
Collects the public key of all users who need to log in, the public key is in the Id_rsa.pub file, and imports our public key into the/home/git/.ssh/authorized_keys file of the Linux server where the Git library resides, one line.
If you do not have the file, you create it and modify the permissions for the corresponding file:
$ cd/home/git
$ mkdir. SSH $ chmod. SSH $ touch
. Ssh/authorized_keys
$ chmod
Public and private keys on the user:
1. First check if it is available.
$ cd ~/.ssh
$ ls
Look for files named Id_rsa and Id_rsa, one is. pub extension (public key), and the other is the private key.
2. If not, use Ssh-keygen to create, press ENTER continuously, indicating that the password is not entered when using the private key.
2 Files Id_rsa and id_rsa.pub (public key) are generated under. ssh.
Special attention points:
The warehouse on 1.git will have write permission to git user, and need to open RSA authentication in/etc/ssh/sshd_config, i.e.
Rsaauthentication Yes
pubkeyauthentication Yes
authorizedkeysfile. Ssh/authorized_keys
2./home/git belongs to the GIT user and has a privilege of 755 or drwxr-xr-x.
3. Ensure that the id_rsa.pub (public key) for each user in the. Ssh/authorized_keys begins with Ssh-rsa.