我在基于 ARM 的嵌入式系统上运行 Ubuntu,该系统缺少电池支持的 RTC。唤醒时间在 1970 年的某个时间。因此,我使用 NTP 服务将时间更新为当前时间。
我将以下行添加到/etc/rc.local文件中:
sudo ntpdate -s time.nist.gov
Run Code Online (Sandbox Code Playgroud)
但是,启动后,仍然需要几分钟才能更新时间,在此期间我无法有效地使用tar和make。
如何在任何给定时间强制更新时钟?
更新 1:以下(感谢 Eric 和 Stephan)在命令行中工作正常,但在放入时无法更新时钟/etc/rc.local:
$ date ; sudo service ntp stop ; sudo ntpdate -s time.nist.gov ; sudo service ntp start ; date
Thu Jan 1 00:00:58 UTC 1970
* Stopping NTP server ntpd [ OK ]
* Starting NTP server [ OK ]
Thu Feb 14 18:52:21 UTC 2013
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
更新 2:我尝试遵循针对第一次更新而提出的一些建议,但似乎实际上没有按要求完成这项工作。这是我尝试过的: …
我的时钟已关闭,因此我想使用ntpdate. 我尝试了几个不同的 NTP 服务器,但由于某种原因,我总是收到以下错误消息:
$ sudo ntpdate ntp.ubuntu.com
4 Mar 12:27:35 ntpdate[1258]: no server suitable for synchronization found
$ sudo ntpdate pool.ntp.org
4 Mar 12:27:50 ntpdate[1267]: no server suitable for synchronization found
$ sudo ntpdate de.pool.ntp.org
4 Mar 12:28:01 ntpdate[1273]: no server suitable for synchronization found
$ sudo ntpdate us.pool.ntp.org
4 Mar 12:28:12 ntpdate[1276]: no server suitable for synchronization found
Run Code Online (Sandbox Code Playgroud)
我查看了相关问题,但没有一个能解决我的问题:
ntpd守护进程的冲突。我根本没有安装这个ntp包(包括ntpd守护进程)。Ubuntu 服务器的当前日期和时间与时区日期和时间不同。我试过使用:
sudo date "30 Sep 2015 4:43:42"
Run Code Online (Sandbox Code Playgroud)
更改它但它没有更改日期和时间,只是在终端上打印了我更改的日期和时间,但是当我执行时:
sudo hwclock --show
Run Code Online (Sandbox Code Playgroud)
日期和时间仍然是旧的。
更改 Ubuntu Server 的日期和时间的正确方法是什么?
我希望 Ubuntu 在启动时自动将我的系统时钟与时间服务器同步。
但是,直到我登录后,我的 PC 才连接到 Internet(加上 5 - 10 秒,以便更好地测量)。
我怎样才能设置它来做到这一点?
跑sudo apt-get update在我的AWS EC2 Ubuntu的LTS 01年4月18日实例失败,因为我的证书验证失败:证书不被信任。尝试访问deb.nodesource.com/node_10.x 仿生版本时,证书颁发者未知
这是运行后的结果 sudo apt-get update
Hit:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Ign:3 https://deb.nodesource.com/node_10.x bionic InRelease
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Err:5 https://deb.nodesource.com/node_10.x bionic Release
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: XX.XXX.XX.XX 443]
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Reading package lists... Done
W: https://deb.nodesource.com/node_10.x/dists/bionic/InRelease: No system …Run Code Online (Sandbox Code Playgroud) 我使用 Ubuntu 16.04 并寻求以特殊方式加强我的 SSH 身份验证。
我有一台带有最小Ubuntu服务器的机器,我主要用来通过其本地OpenSSH服务器传输文件。现在,由于一些原因,我在那台机器上没有防火墙,而且我也避免使用密钥对,因此我只使用了密码。我为抵御蛮力攻击而留下的唯一方法之一,也是我目前最想要的方法,是使用一种机制,在 Y 次连接尝试后阻止用户 X 小时。
我希望有一个独立的机制(即,不作为防火墙的一部分)阻止用户 X 小时,在 Y 数量的连接尝试作为防御蛮力攻击的一种方式之后。
您是否知道可以让我实现所需情况的实用程序(和特定配置)?