Skip to content

Instantly share code, notes, and snippets.

@daryltucker
Created March 26, 2015 20:18
Show Gist options
  • Save daryltucker/5dd1fc9d42646a3bf1be to your computer and use it in GitHub Desktop.
Save daryltucker/5dd1fc9d42646a3bf1be to your computer and use it in GitHub Desktop.
Set Remote Server Date using Local Server Time
#!/bin/bash
# ./push_date user@server
# ssh user@server sudo date -s @`( date -u +"%s" )
ssh $1 sudo date -s @`( date -u +"%s" )
@daryltucker
Copy link
Author

Useful for setting the time on newly-installed devices, such as Raspberry Pi's and other Embedded Devices.

@achton
Copy link

achton commented Apr 9, 2015

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