打开终端, 执行以下操作:
YANGdeMacBook-Pro:~ chengruiyang$ cd ~/.ssh
YANGdeMacBook-Pro:.ssh chengruiyang$ ssh-keygen -t rsa -C "yangyang@***.com" // <注> 邮箱地址
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/chengruiyang/.ssh/id_rsa): id_rsa_DCB
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_rsa_DCB.
Your public key has been saved in id_rsa_DCB.pub.
The key fingerprint is:
SHA256:Mc5yvH20fWu8KnsVjK101b73hZ3qVXLUJImh0frzhaA yangyang@***.com // <注> 邮箱地址
The key's randomart image is:
+---[RSA 2048]----+
| ...o..o|
| oo .o+|</