WHEN SSH DISCONNECTS, I GET LOST


Starting Named Session #
Named sessions are useful when you run multiple screen sessions. To create a named session, run the screen command with the following arguments:

screen -S session_name

It’s always a good idea to choose a descriptive session name.
Detach from Linux Screen Session #
You can detach from the screen session at any time by typing:

Ctrl+a d

Reattach to a Linux Screen #
To resume your screen session use the following command:

screen -r

To find the session ID list the current running screen sessions with:

screen -ls

Nightmare! A great solution to this is the ‘screen’ tool.

All windows run their programs completely independent of each other and, most importantly, programs continue to run when their window is currently not visible and even when the whole screen session is detached from the user’s terminal.

After installing screen, it’s a good idea to just add it to your .profile so it’s started on a new connection. Use screen -RD to reattach to a session else start a new one, and detach a remote session if needed.

Comments

Popular Posts