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 bc879eb9b..337818c63 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -153,6 +153,7 @@ typedef enum { | |||
153 | oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots, | 153 | oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots, |
154 | oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs, | 154 | oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs, |
155 | oStreamLocalBindMask, oStreamLocalBindUnlink, | 155 | oStreamLocalBindMask, oStreamLocalBindUnlink, |
156 | oProtocolKeepAlives, oSetupTimeOut, | ||
156 | oIgnoredUnknownOption, oDeprecated, oUnsupported | 157 | oIgnoredUnknownOption, oDeprecated, oUnsupported |
157 | } OpCodes; | 158 | } OpCodes; |
158 | 159 | ||
@@ -278,6 +279,8 @@ static struct { | |||
278 | { "streamlocalbindmask", oStreamLocalBindMask }, | 279 | { "streamlocalbindmask", oStreamLocalBindMask }, |
279 | { "streamlocalbindunlink", oStreamLocalBindUnlink }, | 280 | { "streamlocalbindunlink", oStreamLocalBindUnlink }, |
280 | { "ignoreunknown", oIgnoreUnknown }, | 281 | { "ignoreunknown", oIgnoreUnknown }, |
282 | { "protocolkeepalives", oProtocolKeepAlives }, | ||
283 | { "setuptimeout", oSetupTimeOut }, | ||
281 | 284 | ||
282 | { NULL, oBadOption } | 285 | { NULL, oBadOption } |
283 | }; | 286 | }; |
@@ -1271,6 +1274,8 @@ parse_int: | |||
1271 | goto parse_flag; | 1274 | goto parse_flag; |
1272 | 1275 | ||
1273 | case oServerAliveInterval: | 1276 | case oServerAliveInterval: |
1277 | case oProtocolKeepAlives: /* Debian-specific compatibility alias */ | ||
1278 | case oSetupTimeOut: /* Debian-specific compatibility alias */ | ||
1274 | intptr = &options->server_alive_interval; | 1279 | intptr = &options->server_alive_interval; |
1275 | goto parse_time; | 1280 | goto parse_time; |
1276 | 1281 | ||
@@ -1791,8 +1796,13 @@ fill_default_options(Options * options) | |||
1791 | options->rekey_interval = 0; | 1796 | options->rekey_interval = 0; |
1792 | if (options->verify_host_key_dns == -1) | 1797 | if (options->verify_host_key_dns == -1) |
1793 | options->verify_host_key_dns = 0; | 1798 | options->verify_host_key_dns = 0; |
1794 | if (options->server_alive_interval == -1) | 1799 | if (options->server_alive_interval == -1) { |
1795 | options->server_alive_interval = 0; | 1800 | /* in batch mode, default is 5mins */ |
1801 | if (options->batch_mode == 1) | ||
1802 | options->server_alive_interval = 300; | ||
1803 | else | ||
1804 | options->server_alive_interval = 0; | ||
1805 | } | ||
1796 | if (options->server_alive_count_max == -1) | 1806 | if (options->server_alive_count_max == -1) |
1797 | options->server_alive_count_max = 3; | 1807 | options->server_alive_count_max = 3; |
1798 | if (options->control_master == -1) | 1808 | if (options->control_master == -1) |
diff --git a/ssh_config.5 b/ssh_config.5 index 01f1f7ff6..ea92ea80d 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 |
@@ -1336,8 +1340,15 @@ from the server, | |||
1336 | will send a message through the encrypted | 1340 | will send a message through the encrypted |
1337 | channel to request a response from the server. | 1341 | channel to request a response from the server. |
1338 | The default | 1342 | The default |
1339 | is 0, indicating that these messages will not be sent to the server. | 1343 | is 0, indicating that these messages will not be sent to the server, |
1344 | or 300 if the | ||
1345 | .Cm BatchMode | ||
1346 | option is set. | ||
1340 | This option applies to protocol version 2 only. | 1347 | This option applies to protocol version 2 only. |
1348 | .Cm ProtocolKeepAlives | ||
1349 | and | ||
1350 | .Cm SetupTimeOut | ||
1351 | are Debian-specific compatibility aliases for this option. | ||
1341 | .It Cm StreamLocalBindMask | 1352 | .It Cm StreamLocalBindMask |
1342 | Sets the octal file creation mode mask | 1353 | Sets the octal file creation mode mask |
1343 | .Pq umask | 1354 | .Pq umask |
@@ -1403,6 +1414,12 @@ Specifies whether the system should send TCP keepalive messages to the | |||
1403 | other side. | 1414 | other side. |
1404 | If they are sent, death of the connection or crash of one | 1415 | If they are sent, death of the connection or crash of one |
1405 | of the machines will be properly noticed. | 1416 | of the machines will be properly noticed. |
1417 | This option only uses TCP keepalives (as opposed to using ssh level | ||
1418 | keepalives), so takes a long time to notice when the connection dies. | ||
1419 | As such, you probably want | ||
1420 | the | ||
1421 | .Cm ServerAliveInterval | ||
1422 | option as well. | ||
1406 | However, this means that | 1423 | However, this means that |
1407 | connections will die if the route is down temporarily, and some people | 1424 | connections will die if the route is down temporarily, and some people |
1408 | find it annoying. | 1425 | find it annoying. |
diff --git a/sshd_config.5 b/sshd_config.5 index c8b43dae3..2843048f1 100644 --- a/sshd_config.5 +++ b/sshd_config.5 | |||
@@ -1307,6 +1307,9 @@ This avoids infinitely hanging sessions. | |||
1307 | .Pp | 1307 | .Pp |
1308 | To disable TCP keepalive messages, the value should be set to | 1308 | To disable TCP keepalive messages, the value should be set to |
1309 | .Dq no . | 1309 | .Dq no . |
1310 | .Pp | ||
1311 | This option was formerly called | ||
1312 | .Cm KeepAlive . | ||
1310 | .It Cm TrustedUserCAKeys | 1313 | .It Cm TrustedUserCAKeys |
1311 | Specifies a file containing public keys of certificate authorities that are | 1314 | Specifies a file containing public keys of certificate authorities that are |
1312 | trusted to sign user certificates for authentication. | 1315 | trusted to sign user certificates for authentication. |