more robust connection: prefer ServerAliveCountMax=3 (ssh default) instead of 1 (jsch default);
--- a/etc/options Sat Dec 23 23:07:26 2017 +0100
+++ b/etc/options Sun Dec 24 12:48:43 2017 +0100
@@ -238,6 +238,9 @@
option ssh_alive_interval : real = 30
-- "time interval to keep SSH server connection alive (seconds)"
+option ssh_alive_count_max : int = 3
+ -- "maximum number of messages to keep SSH server connection alive"
+
section "Build Log Database"
--- a/src/Pure/General/ssh.scala Sat Dec 23 23:07:26 2017 +0100
+++ b/src/Pure/General/ssh.scala Sun Dec 24 12:48:43 2017 +0100
@@ -44,6 +44,9 @@
def alive_interval(options: Options): Int =
options.seconds("ssh_alive_interval").ms.toInt
+ def alive_count_max(options: Options): Int =
+ options.int("ssh_alive_count_max")
+
/* init context */
@@ -85,6 +88,7 @@
session.setUserInfo(No_User_Info)
session.setServerAliveInterval(alive_interval(options))
+ session.setServerAliveCountMax(alive_count_max(options))
session.setConfig("MaxAuthTries", "3")
if (options.bool("ssh_compression")) {