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

@ -63,6 +63,7 @@ module Annex.Locations (
gitAnnexUrlFile,
gitAnnexTmpCfgFile,
gitAnnexSshDir,
gitAnnexSshConfig,
gitAnnexRemotesDir,
gitAnnexAssistantDefaultDir,
HashLevels(..),
@ -402,6 +403,10 @@ gitAnnexTmpCfgFile r = gitAnnexDir r </> "config.tmp"
gitAnnexSshDir :: Git.Repo -> FilePath
gitAnnexSshDir r = addTrailingPathSeparator $ gitAnnexDir r </> "ssh"
{- .git/annex/ssh.config is used to configure ssh. -}
gitAnnexSshConfig :: Git.Repo -> FilePath
gitAnnexSshConfig r = gitAnnexDir r </> "ssh.config"
{- .git/annex/remotes/ is used for remote-specific state. -}
gitAnnexRemotesDir :: Git.Repo -> FilePath
gitAnnexRemotesDir r = addTrailingPathSeparator $ gitAnnexDir r </> "remotes"