Results 1 to 12 of 12

Thread: restart server from SSH

  1. #1
    Registered Member mahdionline's Avatar
    Join Date
    Oct 2003
    Posts
    127

    Default restart server from SSH

    Hi

    I want to restart server from SSH, whtat is the needed command ?

    Regard
    Mahdionline

  2. #2
    Registered Member cPanel Partner NOC Badge ukhost4u's Avatar
    Join Date
    Apr 2003
    Posts
    41

    Default

    Thats easy "reboot" from SSH should do it.
    Paul Hughes
    Senior Tech
    http://www.ukhost4u.com/

  3. #3
    Registered Member
    Join Date
    Jun 2004
    Location
    Columbus, OH
    Posts
    113

    Default

    don't sync; sync; halt;

  4. #4
    Registered Member
    Join Date
    Oct 2003
    Posts
    1,015

    Default

    shutdown -r now

    Time for someone to look for a Linux 101 class or find a few introduction to Linux books and/or websites

  5. #5
    Registered Member cPanel Partner NOC Badge ukhost4u's Avatar
    Join Date
    Apr 2003
    Posts
    41

    Default

    hey, you could always pull the plug or take a good guess
    Paul Hughes
    Senior Tech
    http://www.ukhost4u.com/

  6. #6
    Registered Member
    Join Date
    Oct 2003
    Posts
    1,015

    Default

    Quote Originally Posted by sjackson909
    don't sync; sync; halt;
    No that would not be good if your goal was to reboot

    init 6 (reboot) instead of init 0 (halt) should work though.

    Run

    man shutdown

    and you will see that it simply calls reboot or halt, but it includes a few extra features that make it my choice over a simple

    init 6


  7. #7
    Registered Member This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,499

    Default

    Personally, I use reboot, 'cos it takes away the possibility of forgetting the -R with shutdown or using the wrong init function and having to contact the NOC
    Jonathan Michaelson

    cPanel Server Configuration, Security and Antivirus/AntiSpam Services
    http://www.configserver.com

  8. #8
    Registered Member
    Join Date
    Jun 2004
    Location
    Canada
    Posts
    378

    Default

    in my mind using reboot is bad.... its a shock to the system.

    not to mention if any user is editing files, uploading a file etc.

    using the proper format allows the server to shutdown / reboot on its time

    not yours.

    there are times when reboot or shutdown -r now is required, but most
    of the time you want the services/programs/users to be able to save
    their work and stop what they are doing.

    you wouldnt want an update process for example to be killed in the middle
    of it would you? or for example a user creating or running a db query.

    that would / could corrupt a db.

    Sheldon
    Sheldon King
    Server Adminisrator
    http://www.forgehosting.com

  9. #9
    Registered Member Sinewy's Avatar
    Join Date
    May 2004
    Location
    Sydney, Australia
    Posts
    370
    cPanel/WHM Access Level

    DataCenter Provider

    Default

    reboot = equivalent of Forceful System Reboot in whm
    shutdown -r = equiv of graceful.

  10. #10
    Registered Member This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,499

    Default

    Quote Originally Posted by Sinewy
    reboot = equivalent of Forceful System Reboot in whm
    shutdown -r = equiv of graceful.
    Nope. From the man page:
    If halt or reboot is called when the system is not in runlevel 0 or 6,
    in other words when it's running normally, shutdown will be invoked
    instead (with the -h or -r flag). For more info see the shutdown(8)
    manpage.
    in my mind using reboot is bad.... its a shock to the system.
    Reboot shuts down your processes first, dismounts partitions where it can and then reboots. The chances of corruption are minimal. I don't understand what you're suggesting as an alternative? Don't reboot?
    Jonathan Michaelson

    cPanel Server Configuration, Security and Antivirus/AntiSpam Services
    http://www.configserver.com

  11. #11
    Registered Member
    Join Date
    Oct 2003
    Posts
    1,015

    Default

    Quote Originally Posted by Sinewy
    reboot = equivalent of Forceful System Reboot in whm
    shutdown -r = equiv of graceful.
    They are essentially the same command. Assuming now is appended to the shutdown command, 'shutdown -r now' will call reboot. 'reboot -f' is the not so nice one.

  12. #12
    Registered Member mhbrands's Avatar
    Join Date
    Apr 2003
    Location
    Kansas
    Posts
    17

    Default reboot

    I use:

    /sbin/shutdown -r now

    and have never had a problem
    Wheatland-Hosting.com
    a golden opportunity.

Similar Threads

  1. SSH connection problems / sshd restart failure
    By synaptyx in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 08-02-2013, 10:03 AM
  2. SSH issue (fail on restart)
    By PCZero in forum Security
    Replies: 4
    Last Post: 07-08-2013, 11:21 AM
  3. SSH Restart Failed
    By jackg164 in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 06-03-2011, 08:38 AM
  4. Have to manually restart DNS and FTP after server restart
    By FearlessG1 in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 07-18-2007, 08:32 AM
  5. SSH Down Restart not working
    By zack6924 in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 01-31-2007, 11:36 PM
bargain