Because AuthorizedKeysFile is set to .ssh/authorized_keys, the file is stored under the target user’s home directory. If the target account is git, the path should be /home/git/.ssh/authorized_keys.
Create an SSH key pair and specify RSA as the authentication algorithm. DSA is the older default algorithm on some systems.
$ ssh-keygen -t rsa
This creates a public key and a private key. If you do not change the path and do not set a passphrase, the files are usually saved under the current user’s .ssh directory as id_rsa and id_rsa.pub.
After entering the git user’s password and importing the key successfully, return to the server, confirm that authorized_keys exists, and adjust permissions:
paragraph
Line breaks require two carriage returns
font italic text italic textBold textBold TextBold italic textitalic bold text
dividing line
You can use more than three asterisks, minus signs, and underscores in a line to create a separator line. There can be no other things in the line.
***
-–
strikethrough
Add ~~ at both ends of the textGoogle.com
Underline
Underline
footnote
Format: [^famous text required]
This is a text that requires footnotes 1