first commit
This commit is contained in:
commit
ba848e218d
1001 changed files with 152333 additions and 0 deletions
14
linux基础/openssl生成公私钥转换成ssh-keygen格式.txt
Normal file
14
linux基础/openssl生成公私钥转换成ssh-keygen格式.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
1、使用openssl genrsa工具产生公钥
|
||||
|
||||
首先产生私钥,使用如下命令(因为默认的是2048位,因此这里没有传入key len):openssl genrsa -out private.pem
|
||||
|
||||
2、根据私钥产生对应的公钥。
|
||||
|
||||
使用如下命令:openssl rsa -pubout -in private.pem -out tmp.pem
|
||||
|
||||
3、使用ssh-keygen将公钥转换成ssh格式。
|
||||
|
||||
使用如下命令:ssh-keygen -f tmp.pem -i -mPKCS8 > public.pem
|
||||
|
||||
|
||||
以上,转换完成的priv.pem和pub.pem即为符合ssh-keygen格式的密钥对。
|
Loading…
Add table
Add a link
Reference in a new issue