diff options
-rw-r--r-- | readconf.c | 14 | ||||
-rw-r--r-- | ssh_config.5 | 21 | ||||
-rw-r--r-- | sshd_config.5 | 3 |
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 | |||
205 | If set to | 205 | If set to |
206 | .Dq yes , | 206 | .Dq yes , |
207 | passphrase/password querying will be disabled. | 207 | passphrase/password querying will be disabled. |
208 | In addition, the | ||
209 | .Cm ServerAliveInterval | ||
210 | option will be set to 300 seconds by default. | ||
208 | This option is useful in scripts and other batch jobs where no user | 211 | This option is useful in scripts and other batch jobs where no user |
209 | is present to supply the password. | 212 | is present to supply the password, |
213 | and where it is desirable to detect a broken network swiftly. | ||
210 | The argument must be | 214 | The argument must be |
211 | .Dq yes | 215 | .Dq yes |
212 | or | 216 | or |
@@ -1305,8 +1309,15 @@ from the server, | |||
1305 | will send a message through the encrypted | 1309 | will send a message through the encrypted |
1306 | channel to request a response from the server. | 1310 | channel to request a response from the server. |
1307 | The default | 1311 | The default |
1308 | is 0, indicating that these messages will not be sent to the server. | 1312 | is 0, indicating that these messages will not be sent to the server, |
1313 | or 300 if the | ||
1314 | .Cm BatchMode | ||
1315 | option is set. | ||
1309 | This option applies to protocol version 2 only. | 1316 | This option applies to protocol version 2 only. |
1317 | .Cm ProtocolKeepAlives | ||
1318 | and | ||
1319 | .Cm SetupTimeOut | ||
1320 | are Debian-specific compatibility aliases for this option. | ||
1310 | .It Cm StrictHostKeyChecking | 1321 | .It Cm StrictHostKeyChecking |
1311 | If this flag is set to | 1322 | If 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 | |||
1345 | other side. | 1356 | other side. |
1346 | If they are sent, death of the connection or crash of one | 1357 | If they are sent, death of the connection or crash of one |
1347 | of the machines will be properly noticed. | 1358 | of the machines will be properly noticed. |
1359 | This option only uses TCP keepalives (as opposed to using ssh level | ||
1360 | keepalives), so takes a long time to notice when the connection dies. | ||
1361 | As such, you probably want | ||
1362 | the | ||
1363 | .Cm ServerAliveInterval | ||
1364 | option as well. | ||
1348 | However, this means that | 1365 | However, this means that |
1349 | connections will die if the route is down temporarily, and some people | 1366 | connections will die if the route is down temporarily, and some people |
1350 | find it annoying. | 1367 | find 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 |
1184 | To disable TCP keepalive messages, the value should be set to | 1184 | To disable TCP keepalive messages, the value should be set to |
1185 | .Dq no . | 1185 | .Dq no . |
1186 | .Pp | ||
1187 | This option was formerly called | ||
1188 | .Cm KeepAlive . | ||
1186 | .It Cm TrustedUserCAKeys | 1189 | .It Cm TrustedUserCAKeys |
1187 | Specifies a file containing public keys of certificate authorities that are | 1190 | Specifies a file containing public keys of certificate authorities that are |
1188 | trusted to sign user certificates for authentication. | 1191 | trusted to sign user certificates for authentication. |