Set Date with SSH

Wednesday, 12. May 2010

If ntpdate isn’t feasible, and you need only a few seconds worth of accuracy, this one-liner can set the date over the network with ssh.

ssh root@$HOST "date `date +%m%d%H%M%y.%S`"
Tags: .

One Response to “Set Date with SSH”



  1. Tom Says:

    Make sure you have a ssh keypair so you don’t have to enter your password, else the timing will be off by a few seconds

Leave a Reply