summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--readconf.c14
-rw-r--r--ssh_config.521
-rw-r--r--sshd_config.53
3 files changed, 34 insertions, 4 deletions
diff --git a/readconf.c b/readconf.c
index 29f3bd98d..3d0b6ff90 100644
--- a/readconf.c
+++ b/readconf.c
@@ -177,6 +177,7 @@ typedef enum {
177 oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, 177 oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys,
178 oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, 178 oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes,
179 oPubkeyAcceptedKeyTypes, oCASignatureAlgorithms, oProxyJump, 179 oPubkeyAcceptedKeyTypes, oCASignatureAlgorithms, oProxyJump,
180 oProtocolKeepAlives, oSetupTimeOut,
180 oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported 181 oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported
181} OpCodes; 182} OpCodes;
182 183
@@ -326,6 +327,8 @@ static struct {
326 { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes }, 327 { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes },
327 { "ignoreunknown", oIgnoreUnknown }, 328 { "ignoreunknown", oIgnoreUnknown },
328 { "proxyjump", oProxyJump }, 329 { "proxyjump", oProxyJump },
330 { "protocolkeepalives", oProtocolKeepAlives },
331 { "setuptimeout", oSetupTimeOut },
329 332
330 { NULL, oBadOption } 333 { NULL, oBadOption }
331}; 334};
@@ -1440,6 +1443,8 @@ parse_keytypes:
1440 goto parse_flag; 1443 goto parse_flag;
1441 1444
1442 case oServerAliveInterval: 1445 case oServerAliveInterval:
1446 case oProtocolKeepAlives: /* Debian-specific compatibility alias */
1447 case oSetupTimeOut: /* Debian-specific compatibility alias */
1443 intptr = &options->server_alive_interval; 1448 intptr = &options->server_alive_interval;
1444 goto parse_time; 1449 goto parse_time;
1445 1450
@@ -2133,8 +2138,13 @@ fill_default_options(Options * options)
2133 options->rekey_interval = 0; 2138 options->rekey_interval = 0;
2134 if (options->verify_host_key_dns == -1) 2139 if (options->verify_host_key_dns == -1)
2135 options->verify_host_key_dns = 0; 2140 options->verify_host_key_dns = 0;
2136 if (options->server_alive_interval == -1) 2141 if (options->server_alive_interval == -1) {
2137 options->server_alive_interval = 0; 2142 /* in batch mode, default is 5mins */
2143 if (options->batch_mode == 1)
2144 options->server_alive_interval = 300;
2145 else
2146 options->server_alive_interval = 0;
2147 }
2138 if (options->server_alive_count_max == -1) 2148 if (options->server_alive_count_max == -1)
2139 options->server_alive_count_max = 3; 2149 options->server_alive_count_max = 3;
2140 if (options->control_master == -1) 2150 if (options->control_master == -1)
diff --git a/ssh_config.5 b/ssh_config.5
index c3c8b274a..250c92d04 100644
--- a/ssh_config.5
+++ b/ssh_config.5
@@ -265,8 +265,12 @@ Valid arguments are
265If set to 265If set to
266.Cm yes , 266.Cm yes ,
267passphrase/password querying will be disabled. 267passphrase/password querying will be disabled.
268In addition, the
269.Cm ServerAliveInterval
270option will be set to 300 seconds by default (Debian-specific).
268This option is useful in scripts and other batch jobs where no user 271This option is useful in scripts and other batch jobs where no user
269is present to supply the password. 272is present to supply the password,
273and where it is desirable to detect a broken network swiftly.
270The argument must be 274The argument must be
271.Cm yes 275.Cm yes
272or 276or
@@ -1535,7 +1539,14 @@ from the server,
1535will send a message through the encrypted 1539will send a message through the encrypted
1536channel to request a response from the server. 1540channel to request a response from the server.
1537The default 1541The default
1538is 0, indicating that these messages will not be sent to the server. 1542is 0, indicating that these messages will not be sent to the server,
1543or 300 if the
1544.Cm BatchMode
1545option is set (Debian-specific).
1546.Cm ProtocolKeepAlives
1547and
1548.Cm SetupTimeOut
1549are Debian-specific compatibility aliases for this option.
1539.It Cm SetEnv 1550.It Cm SetEnv
1540Directly specify one or more environment variables and their contents to 1551Directly specify one or more environment variables and their contents to
1541be sent to the server. 1552be sent to the server.
@@ -1615,6 +1626,12 @@ Specifies whether the system should send TCP keepalive messages to the
1615other side. 1626other side.
1616If they are sent, death of the connection or crash of one 1627If they are sent, death of the connection or crash of one
1617of the machines will be properly noticed. 1628of the machines will be properly noticed.
1629This option only uses TCP keepalives (as opposed to using ssh level
1630keepalives), so takes a long time to notice when the connection dies.
1631As such, you probably want
1632the
1633.Cm ServerAliveInterval
1634option as well.
1618However, this means that 1635However, this means that
1619connections will die if the route is down temporarily, and some people 1636connections will die if the route is down temporarily, and some people
1620find it annoying. 1637find it annoying.
diff --git a/sshd_config.5 b/sshd_config.5
index 2baa6622b..2ef671d1b 100644
--- a/sshd_config.5
+++ b/sshd_config.5
@@ -1597,6 +1597,9 @@ This avoids infinitely hanging sessions.
1597.Pp 1597.Pp
1598To disable TCP keepalive messages, the value should be set to 1598To disable TCP keepalive messages, the value should be set to
1599.Cm no . 1599.Cm no .
1600.Pp
1601This option was formerly called
1602.Cm KeepAlive .
1600.It Cm TrustedUserCAKeys 1603.It Cm TrustedUserCAKeys
1601Specifies a file containing public keys of certificate authorities that are 1604Specifies a file containing public keys of certificate authorities that are
1602trusted to sign user certificates for authentication, or 1605trusted to sign user certificates for authentication, or