Run ssh with ServerAliveInterval 60

So that stalled transfers will be noticed within about 3 minutes,
even if TCPKeepAlive is disabled or doesn't work.

Rather than setting with -o, use -F with another config file,
so that any settings in ~/.ssh/config or /etc/ssh/ssh_config overrides this.
This commit is contained in:
Joey Hess 2016-10-26 16:41:34 -04:00
parent 075602b1df
commit 0ae08947ac
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
5 changed files with 45 additions and 11 deletions

View file

@ -59,3 +59,5 @@ SHA256E-s41311329--69c3b054a3fe9676133605730d85b7fcef8696f6782d402a524e41b836253
[[!meta title="Detect stalled transfer and retry or abort it"]]
> [[done]] --[[Joey]]

View file

@ -6,12 +6,12 @@
On the ssh config, one way to do it is to pass -F with a config
file that git-annex generates. It could look like:
Include ~/.ssh/ssh.config
Include /etc/ssh/ssh.config
Include ~/.ssh/config
Include /etc/ssh/ssh_config
ServerAliveInterval 60
Since ssh uses the first config setting it sees, if ~/.ssh/ssh.config
or /etc/ssh/ssh.config set a ServerAliveInterval that one will be used,
Since ssh uses the first config setting it sees, if `~/.ssh/config`
or `/etc/ssh/ssh_config` set a ServerAliveInterval that one will be used,
and otherwise the value git-annex sets will be used.
But.. Ssh enables TCPKeepAlive by default. You'd think that would be enough
@ -23,4 +23,6 @@ or a firewall does not support it.
If the problem is that users are disabling TCPKeepAlive, then
having git-annex enable ServerAliveInterval makes sense.
Ok; implemented this.
"""]]