With the screen command you can run multiple terminals at the same time from a single console login over ssh.
Log into the server or system you would like to install screen on:
# ssh root@[127.0.0.1 example]
Install screen:
Ubuntu:
# apt-get install screen -y
CentOS
# yum install screen -y
To start a screen session with the name maldet_scan:
# screen -S maldet_scan
Then you can start something like maldet:
# maldet -a /var/www/vhosts
Then you can detach from that screen still keeping the window open:
ctrl+a, then ctrl+d
To list available screen sessions to reattach to:
# screen -ls
Then to attach to a screen session:
# screen -r [tab] will give possible screen names to attach to
Here are some screen commands:
Ctrl+a c – Create new window
Ctrl+a k – Kill the current window / session
Ctrl+a w – List all windows
Ctrl+a 0-9 – Go to a window numbered 0 9, use Ctrl+a w to see number
Ctrl+a Ctrl+a – Toggle / switch between the current and previous window
Ctrl+a S – Split terminal horizontally into regions and press Ctrl+a c to create new window there.
Ctrl+a :resize – Resize region
Ctrl+a :fit – Fit screen size to new terminal size. You can also hit Ctrl+a F for the the same task.
Ctrl+a :remove – Remove / delete region. You can also hit Ctrl+a X for the same taks
Ctrl+a tab – Move to next region
Ctrl+a D (Shift-d) – Power detach and logout
Ctrl+a d – Detach but keep shell window open
Ctrl-a Ctrl-\ – Quit screen
Ctrl-a ? – Display help screen i.e. display a list of commands