Skip to content
This repository has been archived by the owner on Dec 19, 2021. It is now read-only.

Set ssh timeout to be resilient for poor network connections #266

Closed
mark-dce opened this issue Sep 3, 2017 · 3 comments
Closed

Set ssh timeout to be resilient for poor network connections #266

mark-dce opened this issue Sep 3, 2017 · 3 comments

Comments

@mark-dce
Copy link
Contributor

mark-dce commented Sep 3, 2017

ISSUE
As configured in the defaults, the ssh session timeout may cause the session to be more likely to die unexpectedly on poor network connections. Since there are no retries, a very short network dropout at just the right time can disconnect you even when you're actively editing a file...

CURRENT SETTINGS
ClientAliveInterval 600
ClientAliveCountMax 0

PROPOSED SETTINGS
ClientAliveInterval 120
ClientAliveCountMax 5

In the proposed settings, the client would have to fail at five consecutive 2-minute checks (i.e. 10 minutes), but would remain alive if the system provides a successful response in any one of the tries. In the original, the session dies immediately on a single check at 10 minutes with no retries.

@acozine
Copy link
Contributor

acozine commented Sep 5, 2017

The defaults were set to meet the production spec for laevigata, with only the one variable available for override:

 # manage inactive ssh sessions
TCPKeepAlive no
ClientAliveInterval {{ ssh_timeout }}
ClientAliveCountMax 0

I agree that adding a variable for the retries is a good idea. Let me noodle on this for a bit.

@mark-dce
Copy link
Contributor Author

mark-dce commented Sep 5, 2017

We may want to think about backwards compatibility and deprecation notification - i.e.

Release X implements new ssh timeout settings and deprecates use without inactivity checks

  • Please set ssh_timeout to your desired value in your config values, default is 0 (to match previous builds)

Release X+1 implements a 10 minute ssh inactivity timeout

  • Please explicitly set your ssh_timeout to 0 if you wish to maintain previous behavior, default is 600 seconds.

@mark-dce
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants