Re: logout from ssh session

From: Mike Hoskins (mike_at_adept.org)
Date: 01/14/04

  • Next message: Dave Markham: "Re: Port forwarding more than once"
    Date: Tue, 13 Jan 2004 19:25:26 -0800
    To: secureshell@securityfocus.com
    
    

    David Danovich wrote:
    > run &
    > where run is some executable program. When I sent such a command and job
    > still running I am not able to logout from the computer.

    possibly,

    3.10 - Hangs when exiting ssh

    OpenSSH may hang when exiting. This can occur when there is an active
    background process. This is known to occur on Linux and HP-UX. The
    problem can be verified by doing the following:

         $ sleep 20 & exit

    Try to use this instead:

         $ sleep 20 < /dev/null > /dev/null 2>&1 &

    A work around for bash users is to place "shopt -s huponexit" in either
    /etc/bashrc or ~/.bashrc. Otherwise, consult your shell's man page for
    an option to enable it to send a HUP signal to active jobs when exiting.

    from,

    http://www.openssh.com/faq.html

    FWIW the 'shopt' option didn't work for me on a few systems, but the
    "proper" handling of file descriptors (longer command line) did.


  • Next message: Dave Markham: "Re: Port forwarding more than once"

    Relevant Pages