how to sync time between two linux servers
- Option 1 Found a way to synchronize date and time with a server over ssh which can quickly solve the problem:
- Option 2
# date --set="$(ssh user@server date)"
Or you can do it the other way around:
# ssh user@host "date --set \"$(date)\""
‘ntpdate 10.200.117.37’
or
‘/usr/sbin/sntp -P no -r 10.200.117.37’
Of course you need to set up a ntp or sntp server first.
Leave a comment