ntpdate 无法同步时间问题
ntpdate同步时间出现的问题:
May 11:28:22 ntpdate[7728]: no server suitable for synchronization found
原因: 托管服务提供商正在阻止 ntp 数据包。为了应对 DDoS 攻击,一些 ISP 已经实施了这种严厉的方法
同步方案一:
sudo date -s "$(curl http://s3.amazonaws.com -v 2>&1 | \
grep "Date: " | awk '{ print $3 " " $5 " " $4 " " $7 " " $6 " GMT"}')"
同步方案二:
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
同步方案三:
安装 htpdate, 使用此包同步
Last updated