By default, many Linux configurations automatically close SSH sessions after a certain amount of inactivity.
You can easily change this setting on your system by editing the sshd configuration file.
Of course, before doing so, you should consider the security implications of keeping SSH sessions active. Setting your server to keep connections alive may present a security [...]