~/vvd_git$ ssh-keygen -t rsa -C "email@example.com" Generating public/private rsa key pair. Enter file in which to save the key (/home/zywvvd/.ssh/id_rsa): Created directory '/home/zywvvd/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/zywvvd/.ssh/id_rsa. Your public key has been saved in /home/zywvvd/.ssh/id_rsa.pub. The key fingerprint is: SHA256:klt1J9JxcGBj7xgB5dC1cXsQmK9ioOhInLRgqKppO8k firstname.lastname@example.org The key's randomart image is: +---[RSA 2048]----+ | o+p+=o+. | | B.Bo+ o | | = *.+ . . | |. o = *. . | |oo . . u.. | |* + . . | |+*.. . . | |*E . . . | |Ooo | +----[SHA256]-----+
在settings中设置 ‘SSH and GPG keys’
添加new SSH key—— 设置名字并将.ssh 文件夹中isa.pub公钥文件的内容复制进去
ssh -T email@example.com
Warning: Permanently added the RSA host key for IP address '188.8.131.52' to the list of known hosts. Hi zywvvd! You've successfully authenticated, but GitHub does not provide shell access.