使用过git的应该对id_rsa秘钥不陌生,总得用Github吧,生成id_rsa很容易
ssh-keygen -t rsa -C "$your_email"
默认情况下,这个秘钥是在账户目录的.ssh目录生成id_rsa文件,对应一个id_rsa.pub公钥文件,实际上这就是ssh协议使用的东西,Git可以使用ssh或者https协议,通常情况下使用ssh协议比较安全。在使用ssh密钥校验模式前,通常先在客户端生成一个密钥对,密钥对可以使用已支持的几种加密算法,但通常rsa算法最常使用
$ ssh-keygen -t rsa -C "test@test.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/zhong/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/zhong/.ssh/id_rsa.
Your public key has been saved in /c/Users/zhong/.ssh/id_rsa.pub.
The key fingerprint is:
5b:44:7e:b8:e5:20:3b:a8:2b:63:45:c0:f8:73:87:f3 test@test.com
The key's randomart image is:
+--[ RSA 2048]----+
| o . |
|. o o . |
| . . . . = o |
| o = .. + * |
| + +. S o . |
| ..E + |
| .. . |
| + . |
| . o. |
+-----------------+
...