Linux ntp-keygen命令

Linux ntp-keygen命令:生成NTP主机密钥。

Linux ntp-keygen命令 功能描述

使用ntp-keygen命令可以生成NTP主机密钥(公钥和私钥)。

Linux ntp-keygen命令 语法

ntp-keygen [选项]

选项含义:
命令中各选项的含义如表所示。



ntp-keygen命令选项含义

Linux ntp-keygen命令 示例

加密生成一个包含有密码和DES-CBC算法的私有数据文件

[root@rhel ~]# ntp-keygen -p redhat
Using OpenSSL version 10000003
Generating RSA keys (512 bits)...
RSA 0 23 36    1 11 24                     3 1 2
Generating new host file and link
ntpkey_host_rhel->ntpkey_RSAkey_rhel.3596254732
Using host key as sign key
Generating certificate RSA-MD5
X509v3 Basic Constraints: critical, CA:TRUE
X509v3 Key Usage: digitalSignature, keyCertSign
Generating new cert file and link
ntpkey_cert_rhel->ntpkey_RSA-MD5cert_rhel.3596254732

生成RSA类型的NTP主机密钥

[root@rhel ~]# ntp-keygen -S RSA
Using OpenSSL version 10000003
Generating RSA keys (512 bits)...
RSA 0 1197    1 11 24                     3 1 2
Generating new sign file and link
ntpkey_sign_rhel->ntpkey_RSAkey_rhel.3596255183
Generating RSA keys (512 bits)...
RSA0434     11148                     314
Generating new host file and link
ntpkey_host_rhel->ntpkey_RSAkey_rhel.3596255183
Generating certificate RSA-MD5
X509v3 Basic Constraints: critical, CA:TRUE
X509v3 Key Usage: digitalSignature, keyCertSign
Generating new cert file and link
ntpkey_cert_rhel->ntpkey_RSA-MD5cert_rhel.3596255183

生成受信任的证书

[root@rhel ~]# ntp-keygen -T
Using OpenSSL version 10000003
Generating RSA keys (512 bits)...
RSA 0 6214    1 11 24                     3 1 2
Generating new host file and link
ntpkey_host_rhel->ntpkey_RSAkey_rhel.3596255334
Using host key as sign key
Generating certificate RSA-MD5
X509v3 Basic Constraints: critical, CA:TRUE
X509v3 Key Usage: digitalSignature, keyCertSign
X509v3 Extended Key Usage: trustRoot
Generating new cert file and link
ntpkey_cert_rhel->ntpkey_RSA-MD5cert_rhel.3596255334

生成RSA类型的NTP主机密钥

[root@rhel ~]# ntp-keygen
Using OpenSSL version 10000003
Generating RSA keys (512 bits)...
RSA 0 11 13    1 11 24                     3 1 2
Generating new host file and link
ntpkey_host_rhel->ntpkey_RSAkey_rhel.3589230078
Using host key as sign key
Generating certificate RSA-MD5
X509v3 Basic Constraints: critical, CA:TRUE
X509v3 Key Usage: digitalSignature, keyCertSign
Generating new cert file and link
ntpkey_cert_rhel->ntpkey_RSA-MD5cert_rhel.3589230078
赞(0)
未经允许不得转载:极客笔记 » Linux ntp-keygen命令
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址