Why server unexpectedly closed network connection?

7.7k Views Asked by At

I'm using a public key on the server and a private key on my local for authentication. Also I access databases on my server through tunneling.

But sadly when I leave that connection alone for about 1 min, that connection will be closed. Why? How can I make it alive forever (until I close it)?

enter image description here

1

There are 1 best solutions below

2
Chris Snow On

In your session properties, go to Connection and under Sending of null packets to keep session active, set Seconds between keepalives (0 to turn off) to e.g. 300 (5 minutes).

Source: https://patrickmn.com/aside/how-to-keep-alive-ssh-sessions/