# OpenSSH
# 运行后,要求用户提供密钥文件名
# 然后在当前目录生成两个密钥文件:id_rsa(私钥)和id_rsa.pub(公钥)
$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
# OpenSSL
# 生成私钥,然后生成公钥
$ openssl genrsa -out private_key.pem 4096
$ openssl rsa -pubout -in private_key.pem -out public_key.pem
# GPG
$ gpg --gen-key
Created
February 4, 2016 09:04
-
-
Save ruanyf/4d2bafcdb437b059b966 to your computer and use it in GitHub Desktop.
3 Ways of Generating SSH Keys: OpenSSH, OpenSSL and GPG
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment