5 月 192015
 

参数
可选择加密算法和加密位数,可增加私钥密码,使用私钥是需输入私钥密码。

-b bits
 Specifies the number of bits in the key to create. For RSA keys,
 the minimum size is 768 bits and the default is 2048 bits. Gen-
 erally, 2048 bits is considered sufficient. DSA keys must be
 exactly 1024 bits as specified by FIPS 186-2.
-P passphrase
 Provides the (old) passphrase.
-t type
 Specifies the type of key to create. The possible values are
 “rsa1” for protocol version 1 and “dsa”, “ecdsa” or “rsa” for
 protocol version 2.
-C comment
 Provides a new comment.

配置

主机A,生成密钥对
centos-ssh-keygen-01
主机A,查看密钥信息
centos-ssh-keygen-02
主机B,生成目录和文件并保存公钥
centos-ssh-keygen-03
主机B,显示IP地址信息
centos-ssh-keygen-04
主机A,使用SSH登录主机B,无需验证密码(用户密码和私钥密码)
centos-ssh-keygen-05
主机A,首次SSH连接断开后,本地保存的主机B公钥信息
centos-ssh-keygen-06

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据