Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Set time with bash over ssh

  • 24-06-2010 3:59pm
    #1
    Registered Users, Registered Users 2 Posts: 3,745 ✭✭✭


    Some servers don't have access to ntp server, any downsides to setting the time like this regularly?
    cat  server_list.parm | while read server; do
    TIME=`date | awk '{print $4}'`
    CMD="date +%T -s "$TIME""
    ssh -n [EMAIL="root@$server"]root@$server[/EMAIL] "$CMD"
    done
    


Comments

  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    Well....The time taken to exchange keys etc. would skew things.

    I'm sure it would be fine 99% of the time.


  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    Why not setup one of the machines that do have net access to act as an NTP server? Assuming the other machines can access this box locally, job done.
    It's always best to use NTP unless you have no other means.


Advertisement