When you close your putty or terminal with ssh connection, session with all commands usually closing or killing. To prevent it we can use one easy command — screen
Screen — like tabs, the ability to start parallel processes, like windows, but in a console. You can exit the server, leaving any process to work in a screen or several screens on server.
Upon returning, you simply activate the hidden screen and see again the command that has not been interrupted all this time.
In fact, it is keeping of SSH Sessions running after disconnection