1:首先在终端输入
ssh-keygen -t rsa -C "your_email@example.com"
2:
之后一路回车键(Enter),就生成了;
Generating public/private rsa key pair.
Enter file in which to save the key (/home/your_email/.ssh/id_rsa):
Created directory '/home/your_email/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/your_email/.ssh/id_rsa.
Your public key has been saved in /home/your_email/.ssh/id_rsa.pub.
The key fingerprint is:
85:60:59:1a:77:45:22:b5:56:c1:10:4e:1f:9f:6f:c8 your_email@example.com
The key's randomart image is:
|**生成的图+
3:
最后生成的秘钥在/home/use/生成一个隐藏文件.ssh,打开隐藏文件,两个文件id_rsa 和 id_rsa.pub,
id_rsa.pub是你的公钥,拷贝这两个