Change server date via SSH

How do I change the server date via ssh shell?

It is pretty easy to change your server date and time via shell.

1. First, execute “date” to see the current date and time:

root@myserver [~]# date
Wed Aug 27 21:03:57 CDT 2008

2. Now, execute in this format to set the new date and time:

root@myserver [~]# date –set=’Wed Aug 27 22:00:00 CDT 2008′

3. Now, execute “date” again to see if the changes get applied:

root@myserver [~]# date
Wed Aug 27 22:00:00 CDT 2008

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.