title: Git clone failing for gerrit repository
body: <p>We have several users working remotely and they are having a lot of problems when trying to clone a git repository which is under gerrit control
  Git clone for a regular git repository using ssh works without problems but trying to clone a repository from gerrit is sometimes working and sometimes failing at random points</p>
  
  <p>Based on the logs it seems the ssh connection got interrupted</p>
  
  <p>We are using gerrit 2.5.2 and are using the default port 29418 for ssh access
  There are no problems reported when using the LAN at work, but with the WAN access it is causing a lot of problems</p>
  
  <p>Is there a way to configure the sshd used within gerrit to be more lenient for WAN connections in terms of interrupts and timeouts?
  Or is it possible to use the already running sshd software on the git / gerrit server (Linux) and replace the one used inside gerrit?
  The machine is a dedicated host just for git and gerrit</p>
  
  <p>Log files:</p>
  
  <p>[2013-05-10 07:41:27,725] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user rk101288 account 30) during git-upload-pack '/mobileclient'
  org.apache.sshd.common.channel.WindowClosedException: Already closed
          at org.apache.sshd.common.channel.Window.waitForSpace(Window.java:153)
          at org.apache.sshd.common.channel.ChannelOutputStream.flush(ChannelOutputStream.java:104)
          at org.apache.sshd.common.channel.ChannelOutputStream.write(ChannelOutputStream.java:75)
          at org.eclipse.jgit.transport.SideBandOutputStream.writeBuffer(SideBandOutputStream.java:171)
          at org.eclipse.jgit.transport.SideBandOutputStream.write(SideBandOutputStream.java:151)
          at org.eclipse.jgit.storage.pack.PackOutputStream.write(PackOutputStream.java:124)
          at org.eclipse.jgit.storage.file.PackFile.copyAsIs2(PackFile.java:489)
          at org.eclipse.jgit.storage.file.PackFile.copyAsIs(PackFile.java:327)
          at org.eclipse.jgit.storage.file.WindowCursor.copyObjectAsIs(WindowCursor.java:162)
          at org.eclipse.jgit.storage.pack.PackWriter.writeObjectImpl(PackWriter.java:1360)
          at org.eclipse.jgit.storage.pack.PackWriter.writeObject(PackWriter.java:1331)
          at org.eclipse.jgit.storage.pack.PackOutputStream.writeObject(PackOutputStream.java:161)
          at org.eclipse.jgit.storage.file.WindowCursor.writeObjects(WindowCursor.java:168)
          at org.eclipse.jgit.storage.pack.PackWriter.writeObjects(PackWriter.java:1319)
          at org.eclipse.jgit.storage.pack.PackWriter.writeObjects(PackWriter.java:1307)
          at org.eclipse.jgit.storage.pack.PackWriter.writePack(PackWriter.java:897)
          at org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:1197)
          at org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:1055)
          at org.eclipse.jgit.transport.UploadPack.service(UploadPack.java:611)
          at org.eclipse.jgit.transport.UploadPack.upload(UploadPack.java:521)
          at com.google.gerrit.sshd.commands.Upload.runImpl(Upload.java:53)
          at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:106)
          at com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:34)
          at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:72)
          at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:430)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
          at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:337)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:736)</p>
  
  <p>[2013-05-10 07:36:23,436 -0400] f15e68b8 rk101288 a/30 LOGIN FROM 172.20.251.105
  [2013-05-10 07:41:27,725 -0400] f15e68b8 rk101288 a/30 LOGOUT
  [2013-05-10 07:41:27,725 -0400] f15e68b8 rk101288 a/30 'git-upload-pack '\''/mobileclient'\''' 0ms 304099ms killed</p>