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 bcd8cad18..640993732 100644
--- a/readconf.c
+++ b/readconf.c
@@ -151,6 +151,7 @@ typedef enum {
151 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass, 151 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass,
152 oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots, 152 oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots,
153 oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs, 153 oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs,
154 oProtocolKeepAlives, oSetupTimeOut,
154 oIgnoredUnknownOption, oDeprecated, oUnsupported 155 oIgnoredUnknownOption, oDeprecated, oUnsupported
155} OpCodes; 156} OpCodes;
156 157
@@ -274,6 +275,8 @@ static struct {
274 { "canonicalizemaxdots", oCanonicalizeMaxDots }, 275 { "canonicalizemaxdots", oCanonicalizeMaxDots },
275 { "canonicalizepermittedcnames", oCanonicalizePermittedCNAMEs }, 276 { "canonicalizepermittedcnames", oCanonicalizePermittedCNAMEs },
276 { "ignoreunknown", oIgnoreUnknown }, 277 { "ignoreunknown", oIgnoreUnknown },
278 { "protocolkeepalives", oProtocolKeepAlives },
279 { "setuptimeout", oSetupTimeOut },
277 280
278 { NULL, oBadOption } 281 { NULL, oBadOption }
279}; 282};
@@ -1247,6 +1250,8 @@ parse_int:
1247 goto parse_flag; 1250 goto parse_flag;
1248 1251
1249 case oServerAliveInterval: 1252 case oServerAliveInterval:
1253 case oProtocolKeepAlives: /* Debian-specific compatibility alias */
1254 case oSetupTimeOut: /* Debian-specific compatibility alias */
1250 intptr = &options->server_alive_interval; 1255 intptr = &options->server_alive_interval;
1251 goto parse_time; 1256 goto parse_time;
1252 1257
@@ -1746,8 +1751,13 @@ fill_default_options(Options * options)
1746 options->rekey_interval = 0; 1751 options->rekey_interval = 0;
1747 if (options->verify_host_key_dns == -1) 1752 if (options->verify_host_key_dns == -1)
1748 options->verify_host_key_dns = 0; 1753 options->verify_host_key_dns = 0;
1749 if (options->server_alive_interval == -1) 1754 if (options->server_alive_interval == -1) {
1750 options->server_alive_interval = 0; 1755 /* in batch mode, default is 5mins */
1756 if (options->batch_mode == 1)
1757 options->server_alive_interval = 300;
1758 else
1759 options->server_alive_interval = 0;
1760 }
1751 if (options->server_alive_count_max == -1) 1761 if (options->server_alive_count_max == -1)
1752 options->server_alive_count_max = 3; 1762 options->server_alive_count_max = 3;
1753 if (options->control_master == -1) 1763 if (options->control_master == -1)
diff --git a/ssh_config.5 b/ssh_config.5
index 473971e63..3172fd441 100644
--- a/ssh_config.5
+++ b/ssh_config.5
@@ -205,8 +205,12 @@ Valid arguments are
205If set to 205If set to
206.Dq yes , 206.Dq yes ,
207passphrase/password querying will be disabled. 207passphrase/password querying will be disabled.
208In addition, the
209.Cm ServerAliveInterval
210option will be set to 300 seconds by default.
208This option is useful in scripts and other batch jobs where no user 211This option is useful in scripts and other batch jobs where no user
209is present to supply the password. 212is present to supply the password,
213and where it is desirable to detect a broken network swiftly.
210The argument must be 214The argument must be
211.Dq yes 215.Dq yes
212or 216or
@@ -1305,8 +1309,15 @@ from the server,
1305will send a message through the encrypted 1309will send a message through the encrypted
1306channel to request a response from the server. 1310channel to request a response from the server.
1307The default 1311The default
1308is 0, indicating that these messages will not be sent to the server. 1312is 0, indicating that these messages will not be sent to the server,
1313or 300 if the
1314.Cm BatchMode
1315option is set.
1309This option applies to protocol version 2 only. 1316This option applies to protocol version 2 only.
1317.Cm ProtocolKeepAlives
1318and
1319.Cm SetupTimeOut
1320are Debian-specific compatibility aliases for this option.
1310.It Cm StrictHostKeyChecking 1321.It Cm StrictHostKeyChecking
1311If this flag is set to 1322If this flag is set to
1312.Dq yes , 1323.Dq yes ,
@@ -1345,6 +1356,12 @@ Specifies whether the system should send TCP keepalive messages to the
1345other side. 1356other side.
1346If they are sent, death of the connection or crash of one 1357If they are sent, death of the connection or crash of one
1347of the machines will be properly noticed. 1358of the machines will be properly noticed.
1359This option only uses TCP keepalives (as opposed to using ssh level
1360keepalives), so takes a long time to notice when the connection dies.
1361As such, you probably want
1362the
1363.Cm ServerAliveInterval
1364option as well.
1348However, this means that 1365However, this means that
1349connections will die if the route is down temporarily, and some people 1366connections will die if the route is down temporarily, and some people
1350find it annoying. 1367find it annoying.
diff --git a/sshd_config.5 b/sshd_config.5
index ceed88a1d..2164d5841 100644
--- a/sshd_config.5
+++ b/sshd_config.5
@@ -1183,6 +1183,9 @@ This avoids infinitely hanging sessions.
1183.Pp 1183.Pp
1184To disable TCP keepalive messages, the value should be set to 1184To disable TCP keepalive messages, the value should be set to
1185.Dq no . 1185.Dq no .
1186.Pp
1187This option was formerly called
1188.Cm KeepAlive .
1186.It Cm TrustedUserCAKeys 1189.It Cm TrustedUserCAKeys
1187Specifies a file containing public keys of certificate authorities that are 1190Specifies a file containing public keys of certificate authorities that are
1188trusted to sign user certificates for authentication. 1191trusted to sign user certificates for authentication.