Results 1 to 6 of 6

Thread: SSH Session Hangs After Shutdown Command

  1. #1
    Join Date
    Sep 2009
    Location
    Missouri, USA
    Beans
    265
    Distro
    Ubuntu 10.04 Lucid Lynx

    SSH Session Hangs After Shutdown Command

    After I issue the shutdown command (ie. sudo shutdown -h +20) in an ssh session on another ubuntu machine on my LAN at home, I receive the "system will shutdown in 20 minutes" message and then can no longer type anything into the session, leaving me unable to logout.

    When I searched the web for answers, I found one suggestion to try pressing ENTER then ~ (tilda) then . (period) to end the ssh session. It did, but I should be able to type after issuing the delayed shutdown command in an ssh session.

    Solutions?
    I'd rather die fighting lions than being trampled by geese.

  2. #2
    Join Date
    Oct 2006
    Location
    New York
    Beans
    1,118
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: SSH Session Hangs After Shutdown Command

    What happens if you background the shutdown command on issue?
    sudo shutdown -h +20 &
    And then you might need to nohup it if you're going to logout before the shutdown.
    xubuntu minimal, extensive experience, lshw: http://goo.gl/qCCtn
    blog: http://goo.gl/yLg78
    Linux viruses: http://goo.gl/6OCKA

  3. #3
    Join Date
    Feb 2008
    Beans
    Hidden!

    Re: SSH Session Hangs After Shutdown Command

    Code:
    sudo shutdown -h +20 && exit


  4. #4
    Join Date
    Sep 2009
    Location
    Missouri, USA
    Beans
    265
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: SSH Session Hangs After Shutdown Command

    Neither solution works. Still hangs.

    Even if it worked, those wouldn't allow me to keep using my session. Maybe I want to shutdown -h +120 and then keep using my session for a few things. Shouldn't that be possible, or is it designed to be this way? Surely it's not supposed to hang when the shutdown command is issued. It happens on Lucid, Lubuntu, and other releases of Ubuntu.

  5. #5
    Join Date
    Sep 2009
    Location
    Missouri, USA
    Beans
    265
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: SSH Session Hangs After Shutdown Command

    bump
    I'd rather die fighting lions than being trampled by geese.

  6. #6
    Join Date
    Mar 2011
    Beans
    13

    Re: SSH Session Hangs After Shutdown Command

    thank you for the code it works for me appreciate

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •