Contents
What happens when you shut down a SSH session?
During that time the process will continue to run. As Warner also said, the process can choose to ignore SIGHUP, in which case, it will continue to run until it has to request input and then find STDIN has closed. Does getting disconnected from an SSH session kill your programs?
What happens when I Disconnect from my SSH account?
As other’s have mentioned, once you disconnect from ssh anything running within it is gone. As @Michael Hampton and others have mentioned you can use tools like tmux or screen to disconnect/reconnect to terminals without loosing their content (i.e. child processes).
How to keep remote SSH running after logout?
Another elegant way of letting your command or a single task run in background and remain alive even after session logout or disconnection is by using disown.
What happens if I get disconnected from my terminal?
No, any programs still attached to the terminal, and not placed into the background with something like nohup, would be killed. This is why there are virtual terminal solutions like tmux and the older screen which create sessions which continue running even if you are disconnected, and to which you can reattach later.
Which is the controlling terminal of the SSH daemon?
When you logged in, the SSH daemon allocated a pseudo-terminal for you and attached it to your user’s configured login shell. This is called the controlling terminal. Every program you start normally at that point, no matter how many layers of shells deep, will ultimately “trace its ancestry” back to that shell.
What happens when my SSH connection is dead?
When the SSH daemon process associated with your connection decides that your connection is dead, it sends a hangup signal (SIGHUP) to the login shell.
Which is the controlling terminal in a shell?
This is called the controlling terminal. Every program you start normally at that point, no matter how many layers of shells deep, will ultimately “trace its ancestry” back to that shell. You can observe this with the pstree command.