This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Remote Rebooting via SSH??

There must be a way to do this, but I searched the threads and can't find it.  I just ran Up2Date 4.021 to 4.022 on a remote ASL box, and WebAdmin won't come back up.  I know the box is working because my IPSEC VPN tunnel was reestablished in about 2 minutes, and because I can SSH into the box across the VPN (private IP only).

My question is, is it possible either to restart WebAdmin or to reboot the whole box via my SSH login?  If so, would someone please let me know the commands?

Thanks,

Dan


This thread was automatically locked due to age.
Parents
  • [ QUOTE ]
    There must be a way to do this, but I searched the threads and can't find it.  I just ran Up2Date 4.021 to 4.022 on a remote ASL box, and WebAdmin won't come back up.  I know the box is working because my IPSEC VPN tunnel was reestablished in about 2 minutes, and because I can SSH into the box across the VPN (private IP only).
    as KD said..login as root then issue a shutdown -r(restart) -h(shutdown/halt) now
    that will reboot the box..[:)]

    My question is, is it possible either to restart WebAdmin or to reboot the whole box via my SSH login?  If so, would someone please let me know the commands?

    Thanks,

    Dan 

    [/ QUOTE ]

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • Not Quite. . .with ssh you have to log in as loginuser, not as root.  As loginuser it claims it can't find a command "shutdown."  Gotta login as loginuser then do an "su" to get to root, and then it *does* work.

    Thanks for the help, both of you!  Once I figured out I could get to root from su (duh!) it was fine!

    Dan
  • i apologize i assumned you knew the loginuser step...[:)]

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • I just had to do it because of 4.022 and webadmin not coming up...

    ssh into the box and then after logging in "su"....then you can enter the reboot command...

    btw...after rebooting everything back to normal...

    gluck,

    [edit] whoops...I guess I should've read a little bit further down and seen that you found a solution to the problem already.... [:)]
Reply
  • I just had to do it because of 4.022 and webadmin not coming up...

    ssh into the box and then after logging in "su"....then you can enter the reboot command...

    btw...after rebooting everything back to normal...

    gluck,

    [edit] whoops...I guess I should've read a little bit further down and seen that you found a solution to the problem already.... [:)]
Children
  • oops, sorry, should have said...... ssh to the box as loginuser :

    either:

    ssh2 -l loginuser 1.2.3.4

    or

    ssh -l loginuser 1.2.3.4

    depending on your version of ssh (note that the difference between ssh and ssh2 is not the protocol version (both use ssh v2), but one is open ssh, the other the "SSH.com" version.....

    then, as loginuser type:

    /bin/su -

    on hitting enter you'll get asked for the root password. once root, you can shutdown, reboot, and generally destroy your system if sufficient care is not employed [;)]

    ....one extra note..... you should always full path 'su' on *nix boxes by typing /bin/su (or whereever it is) .... it's good practice to help avoid trojans that may have been dropped into your path ahead of the real su [:)]

    Cheers,

    Karl