verify the date & time on remote linux without using ssh/rsh/ntp? [closed]
Solution 1:
You can use the rdate
or ntpq
program to easily query a remote machine running the appropriate daemon:
$ ntpdate -q time.nrc.ca; ntpdate -q tick; ntpdate -q tock
server 132.246.11.229, stratum 2, offset 0.006155, delay 0.04842
server 132.246.11.227, stratum 2, offset 0.006039, delay 0.04832
server 132.246.11.228, stratum 2, offset 0.006214, delay 0.04837
17 Nov 14:52:24 ntpdate[29211]: adjust time server 132.246.11.227 offset 0.006039 sec
$ ntpdate -q tick
server 192.168.0.6, stratum 3, offset 0.004005, delay 0.02576
17 Nov 14:52:32 ntpdate[29212]: adjust time server 192.168.0.6 offset 0.004005 sec
$ ntpdate -q tock
server 192.168.0.5, stratum 3, offset 0.003864, delay 0.02580
17 Nov 14:52:40 ntpdate[29353]: adjust time server 192.168.0.5 offset 0.003864 sec
If you are trying to ensure your clocks are synced, you should set up NTP.