If you facing SSH session disconnecting problem then please follow the below steps:
This tutorial increase your ssh session. In my case I will increase it to 1 day.
Open the sshd configuration file with any preferable Linux text editor
# vim /etc/ssh/sshd_config
Add the following lines to the end of this file
This means ssh will not die untill (60*1440) secconds/1 day. you can increase this value as per your requirement.
Save and close the file.
Restart the ssh service
# /etc/init.d/ssh restart OR # systemctl restart ssh
Done, If you face any issue regarding this please comment.