quackduck/devzat

Keep connection alive

Closed this issue · 9 comments

UBFI commented

After a while if a users has been connected without saying anything their connection to the server will be closed.
Connection to closed by remote host.

Are you sure the client doesn't have a timeout set? How long is a while? What is your SSH version?

UBFI commented

Tested stock MacOS OpenSSH_8.6p1, LibreSSL 3.3.5 and with Putty on Windows.

How long does it take for it to kick you?

I wonder if this might affect all network connections to your server. Does running nc -l <port> on the server, and then nc <server hostname> <port> stay open indefinitely?

UBFI commented

This issue was found to be directly caused by my tunneling provider however the issue can and should be mitigated in Devzat's codebase. Other SSH daemons function normally even being connected for several days even on the same tunnel and port.

If netcat doesn't work fixing this problem would be more of an enhancement than a bug. We'd have to investigate how those other SSH daemons keep the connection open.

UBFI commented

I actually found that current versions of netcat do NOT close the connection but it simply hangs for about 20ms every 5-10 minutes.

How did you find out there was a tunneling problem?

Fixed in 55419b6