ssh-keygen命令参数

4 min read

常用参数:

-b 指定密钥长度
-e 读取openssh的私钥或者公钥文件
-f 指定用来保存密钥的文件名
-t 指定要创建的密钥类型
-C 添加注释

参考实例

创建一个默认密钥:

[root@linuxcool ~]# ssh-keygen

使用-t参数创建一个指定密钥的类型并添加注释:

[root@linuxcool ~]# ssh-keygen -t rsa -C "[email protected]" 

使用-e参数读取openssh的私钥或者公钥文件:

[root@linuxcool ~]# ssh-keygen -e