0

I have two Linux machines, ( red hat 5.3 )

my question:

is it possible to verify the date & time on remote Linux machine without use ssh/rsh/ntp?

or maybe there is other tool for that?

4
  • If you can't use ssh/rsh how are you running the mount command ?
    – user9517
    Nov 17, 2011 at 19:42
  • 2
    Why aren't you using NTP to keep the computer's clock synced?
    – Chris S
    Nov 17, 2011 at 19:45
  • I cant use the rsh/ssh because security , but I have ping to the other machine and I can mount to the other machine , but please I cant use ssh/rsh please advice ??? ,
    – Diana
    Nov 17, 2011 at 19:45
  • 3
    @Diana: You have asked quite a lot of very basic questions. You really should speak to your manager about getting some basic training
    – user9517
    Nov 17, 2011 at 19:56

1 Answer 1

3

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.

3
  • because security reson I cant use ntpdate.... sorry
    – Diana
    Nov 17, 2011 at 20:10
  • 3
    Well, that's the Correct Way to do it. If you are blocked from doing so because of your security policy, that needs to be addressed by talking to your security department and explaining the reason for your exception.
    – MikeyB
    Nov 17, 2011 at 20:18
  • 4
    @Diana Sounds like you're being put in impossible situations. You have basically no access to a server, but you need to do something administrative on it. Either you need some administrative privilege, or you shouldn't be responsible for it.
    – Chris S
    Nov 17, 2011 at 20:20

Not the answer you're looking for? Browse other questions tagged .