Skip to content

Instantly share code, notes, and snippets.

@alepez
Created June 30, 2015 12:54
Show Gist options
  • Save alepez/5d0456c3f8afc62bebef to your computer and use it in GitHub Desktop.
Save alepez/5d0456c3f8afc62bebef to your computer and use it in GitHub Desktop.
set datetime taken from remote via ssh (when ntp isn't available)
sudo date -s "$( ssh user@host 'date "+%Y-%m-%d %H:%M:%S"' )"; sudo hwclock --systohc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment