Re: logout from ssh session

From: Robert Deacle (
Date: 01/14/04

  • Next message: Mike Hoskins: "Re: logout from ssh session"
    Date: Tue, 13 Jan 2004 23:23:21 -0500
    To: David Danovich <>

    Assuming you want the job to continue running after you log out,
    I would use the nohup command to protect it from the hangup sent
    to you processes when you log out, and give it another level
    of separation from your login shell with ( )

    e.g. ( nohup run &)&

    This can even be useful in system startup scripts for processes
    you want started at boot time, but do not understand what
    being a daemon is about, so do not fork and separate themself
    from the boot process.

    Bob Deacle

    David Danovich wrote:
    > Hi,
    > I am not sure that I am asking the right forum but I will try.
    > I have several computers which connected through ssh using following
    > command
    > ssh user_name@computer_name
    > and it works fine until I want to run some command (some job) in
    > background using following
    > command
    > 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. When I write logout computer just
    > freeze and wait till job finished.
    > Without job running in background it is not a problem to logout.
    > I do not know what is wrong. May be I need to change something in
    > config_sshd? If I use telnet everything is fine.
    > I would appreciate any help.
    > Thank you David

    Robert Deacle
    ITS Unix Team
    (919) 981-5062
    Mail to and from may be subject to the NC
    Public Records Law and may be disclosed to third parties
    by an authorized state official.

  • Next message: Mike Hoskins: "Re: logout from ssh session"

    Relevant Pages

    • nohup command problem
      ... nohup command. ... TSM scheduler started regulary but after that ... ... Every script which invoke nohup command begin to run incremental ... Incremental backup of volume '/' ...
    • Re: [opensuse] Running process list
      ... I launch an application with nohup command in a terminal ... Can you reattach to the output from a process started from a terminal ...
    • nohup help
      ... I need help adding a nohup command in this command line: ... When I execute the script using root on the command line it works ... I am trying to capture the error using the nohup command. ... This script will go into the etc/init.d and rc2.d directory. ...
    • Re: logout from ssh session
      ... Using nohup command as you ... Subject: logout from ssh session ... > David Danovich wrote: ...
    • Re: logout from ssh session
      ... If you try to do that on an xterm or a console, the shell will say you "zsh: ... If you want to background a process and then logout, use the 'setsid' command ...