screen

screen allow you to run commands in remote server even after you disconnect.

disconnect from a session

You can just close terminal, program running inside screen will keep running.

Other solution is press

CTRL + A, then press CTRIL +D in quick succession.