0

When I open an SSH connection to our database server and leave it open for a longer time, the connection gets lost at some point. I don't know why or how, but this happens a lot. I still see the prompt, but can't enter anything. I usually kill the terminal and open a new one. If I wait much longer, I get an error message.

However, when I login to MySQL after logging in with SSH, this doesn't happen. The connection stays open. If this is possible, I guess it's a matter of keeping the connection alive.

How does this work and can I set SSH to do better?

SPRBRN
  • 1,117

1 Answers1

1

You can implement ServerAliveInterval, ClientAliveInterval, and ClientAliveCountMax to solve your timeout issue.

Please see this post

earthmeLon
  • 1,160
  • 1
  • 8
  • 17