我需要部署一个ntp服务器与密钥authentication。 我有Ubuntu 14.04.2服务器x86_64作为ntp服务器和CentOS 6.7 x86_64作为客户端进行testing。
为了设置我的ntp服务器,我使用了这个指南 。
但是我有这个设置的问题。 在客户端生成密钥后,我无法启动ntpd进程,出现以下错误:
ntpd[15940]: crypto_setup: host key file ntpkey_host_myclient not found or corrupt
客户端的ntp.conf文件:
server myserver autokey crypto pw clientpassword includefile /etc/ntp/crypto/pw keys /etc/ntp
客户的密钥目录列表:
drwxr-x---. 2 root ntp 4096 Aug 8 12:35 crypto -rw-------. 1 root root 73 Apr 28 13:11 keys lrwxrwxrwx. 1 root root 44 Aug 8 14:21 ntpkey_host_myclient -> ntpkey_RSAhost_myclient.3648021691 lrwxrwxrwx. 1 root root 34 Aug 8 14:20 ntpkey_iffpar_myserver -> ntpkey_iffpar_myserver.3648021197 -rw-r--r--. 1 root root 367 Aug 8 14:19 ntpkey_iffpar_myserver.3648021197 -rw-r--r--. 1 root root 722 Aug 8 14:21 ntpkey_RSAhost_myclient.3648021691 -rw-r--r--. 1 root root 52 Apr 28 13:11 step-tickers
在将iffpar文件从服务器发送到客户端之后,我在客户端上对该文件进行了符号链接。 然后我导出这个参数:
> ntp-keygen -q `awk '/crypto pw/ { print $3 }' </etc/ntp.conf` Using OpenSSL version OpenSSL 1.0.1e-fips 11 Feb 2013 Using host myclient group myclient Generating RSA keys (512 bits)... RSA 0 26 35 1 11 24 3 1 2 Generating new host file and link ntpkey_host_myclient->ntpkey_RSAhost_myclient.3648021691 Using host key as sign key
它看起来像确定,但客户端上的ntpd守护进程不能以上面的错误启动。
你能帮我解决这个问题吗?
谢谢。