Hi, I’ve been trying to figure this out for a bit now, if I leave my windows preview terminal open, while SSH’d into a Ubuntu droplet for a certain amount of time (looks like 5 minutes of not using the terminal can be used to reproduce this) it stops letting me type into the terminal. I googled this and came to the conclusion it’s the session timing out. I saw a thread on superusers saying putting this in etc/ssh/sshd_config this should fix it:


#ClientAliveInterval 30 TCP
#KeepAlive yes
#ClientAliveCountMax 99999

but it did not fix it and I still “timeout” in 5 minutes or less. (I don’t know if i’m timing out, just I cannot input anything into the terminal and I have to relog back in)

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi there @pentestlabs10138,

Note that you need to make the change to the /etc/ssh/sshd_config file on the server and not the /etc/sshd_config.

Also to double-check, did you add those lines without the # symbol at the beginning? If the # symbol is there you need to remove it otherwise the values will not take effect.

Another thing to keep in mind is to make sure to restart SSH after that:

  • sudo systemctl restart sshd

Let me know how it goes!
Regards,
Bobby

Submit an Answer