0

I have an Intel NUC running Debian 10. I installed ssh server with: sudo apt-get install openssh-server then started it with: service sshd start And it works great.

[edit] When ssh dies, all I have to do is hit return on the keyboard on the server console. Then I can reconnect using ssh.

[edit] I opened an ssh session and let top run. It, too, stops after about 20-minutes.

Any guess why?

5
  • Could you please update your post with the exact message you get? Also in your ssh config file, what is the values of ClientAliveInterval and ClientAliveCountMax? Thank you.
    – kemotep
    Feb 26, 2021 at 20:54
  • Thanks for the reply- There's no message, the ssh connection at my desk just dies. I go down to the basement, hit return on the keyboard, then back upstairs to restart the session and log in again (I am using Putty). My ssh_config contains ClientAliveInterval 30, ClientAliveCountMax 6 Feb 26, 2021 at 21:41
  • So there are several things that might be at play here. But off the bat, your client keep alive settings are for 30 seconds with 6 retries. Or 3 minutes of keeping the session active. Try setting it 1200 and 3 respectively, to give yourself a keep alive time of 1 hour. Let me know if that works and I will look into alternatives.
    – kemotep
    Feb 26, 2021 at 21:52
  • Changed the settings, and coincidentally went away for almost an hour and ssh broke shortly later. What I don't get is why does hitting 'return' on the keyboard on the server re-establish ssh? I don't see a connection. Feb 26, 2021 at 23:32
  • It look like the server console sleeping is not related to my problem. What I don't get is why does hitting 'return' on the keyboard on the server re-establishes ssh? I don't see a connection. I just came back to the ssh terminal and hit return randomly every few minutes, and the ssh connection dies after ten or 15 minutes. What baffles me is why does pressing return on the console keyboard re-establish ssh. UPDATE, ssh is still running because I can still open a new terminal session (putty). Feb 27, 2021 at 0:40

0

You must log in to answer this question.

Browse other questions tagged .