IF YOU WANT TO MAKE A CONSTANT! The above is the answer for the sessions, and you will have to change it every time you connect. Try editing the sshd_config or ssh_config (depending on what is used to set the timeout). In my case, he was in
/etc/ssh/sshd_config
Below the configuration worked for me:
ClientAliveInterval 6000 ClientAliveCountMax 3
source share