Created
March 26, 2015 20:18
-
-
Save daryltucker/5dd1fc9d42646a3bf1be to your computer and use it in GitHub Desktop.
Set Remote Server Date using Local Server Time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ./push_date user@server | |
| # ssh user@server sudo date -s @`( date -u +"%s" ) | |
| ssh $1 sudo date -s @`( date -u +"%s" ) |
You are missing a closing backtick, I believe?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Useful for setting the time on newly-installed devices, such as Raspberry Pi's and other Embedded Devices.