Using Tmux (Terminal Multiplexer) to Keep SSH Sessions Running

Tmux is another software which is created to be a replacement for screen. It has most of the capabilities of screen, with few additional capabilities which make it more powerful than screen.

Install tmux

yum -y install tmux

Start a Tmux Session

$ tmux

After performing your operations on the terminal, you can detach that session from the controlling terminal so that it goes into background and you can safely logout.

Detach Tmux Session from Terminal

use the shortcut (Ctrl+b then d)
After this your current session will be detached and you will come back to your terminal from where you can log out safely.

Resuming the Closed Tmux Session

tmux attach