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 278fe152b..1d2d59648 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -159,6 +159,7 @@ typedef enum { | |||
159 | oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs, | 159 | oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs, |
160 | oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, | 160 | oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, |
161 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, | 161 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, |
162 | oProtocolKeepAlives, oSetupTimeOut, | ||
162 | oIgnoredUnknownOption, oDeprecated, oUnsupported | 163 | oIgnoredUnknownOption, oDeprecated, oUnsupported |
163 | } OpCodes; | 164 | } OpCodes; |
164 | 165 | ||
@@ -288,6 +289,8 @@ static struct { | |||
288 | { "updatehostkeys", oUpdateHostkeys }, | 289 | { "updatehostkeys", oUpdateHostkeys }, |
289 | { "hostbasedkeytypes", oHostbasedKeyTypes }, | 290 | { "hostbasedkeytypes", oHostbasedKeyTypes }, |
290 | { "ignoreunknown", oIgnoreUnknown }, | 291 | { "ignoreunknown", oIgnoreUnknown }, |
292 | { "protocolkeepalives", oProtocolKeepAlives }, | ||
293 | { "setuptimeout", oSetupTimeOut }, | ||
291 | 294 | ||
292 | { NULL, oBadOption } | 295 | { NULL, oBadOption } |
293 | }; | 296 | }; |
@@ -1299,6 +1302,8 @@ parse_int: | |||
1299 | goto parse_flag; | 1302 | goto parse_flag; |
1300 | 1303 | ||
1301 | case oServerAliveInterval: | 1304 | case oServerAliveInterval: |
1305 | case oProtocolKeepAlives: /* Debian-specific compatibility alias */ | ||
1306 | case oSetupTimeOut: /* Debian-specific compatibility alias */ | ||
1302 | intptr = &options->server_alive_interval; | 1307 | intptr = &options->server_alive_interval; |
1303 | goto parse_time; | 1308 | goto parse_time; |
1304 | 1309 | ||
@@ -1858,8 +1863,13 @@ fill_default_options(Options * options) | |||
1858 | options->rekey_interval = 0; | 1863 | options->rekey_interval = 0; |
1859 | if (options->verify_host_key_dns == -1) | 1864 | if (options->verify_host_key_dns == -1) |
1860 | options->verify_host_key_dns = 0; | 1865 | options->verify_host_key_dns = 0; |
1861 | if (options->server_alive_interval == -1) | 1866 | if (options->server_alive_interval == -1) { |
1862 | options->server_alive_interval = 0; | 1867 | /* in batch mode, default is 5mins */ |
1868 | if (options->batch_mode == 1) | ||
1869 | options->server_alive_interval = 300; | ||
1870 | else | ||
1871 | options->server_alive_interval = 0; | ||
1872 | } | ||
1863 | if (options->server_alive_count_max == -1) | 1873 | if (options->server_alive_count_max == -1) |
1864 | options->server_alive_count_max = 3; | 1874 | options->server_alive_count_max = 3; |
1865 | if (options->control_master == -1) | 1875 | if (options->control_master == -1) |
diff --git a/ssh_config.5 b/ssh_config.5 index dd35dd8d1..250c0d15a 100644 --- a/ssh_config.5 +++ b/ssh_config.5 | |||
@@ -233,8 +233,12 @@ Valid arguments are | |||
233 | If set to | 233 | If set to |
234 | .Dq yes , | 234 | .Dq yes , |
235 | passphrase/password querying will be disabled. | 235 | passphrase/password querying will be disabled. |
236 | In addition, the | ||
237 | .Cm ServerAliveInterval | ||
238 | option will be set to 300 seconds by default. | ||
236 | This option is useful in scripts and other batch jobs where no user | 239 | This option is useful in scripts and other batch jobs where no user |
237 | is present to supply the password. | 240 | is present to supply the password, |
241 | and where it is desirable to detect a broken network swiftly. | ||
238 | The argument must be | 242 | The argument must be |
239 | .Dq yes | 243 | .Dq yes |
240 | or | 244 | or |
@@ -1420,8 +1424,15 @@ from the server, | |||
1420 | will send a message through the encrypted | 1424 | will send a message through the encrypted |
1421 | channel to request a response from the server. | 1425 | channel to request a response from the server. |
1422 | The default | 1426 | The default |
1423 | is 0, indicating that these messages will not be sent to the server. | 1427 | is 0, indicating that these messages will not be sent to the server, |
1428 | or 300 if the | ||
1429 | .Cm BatchMode | ||
1430 | option is set. | ||
1424 | This option applies to protocol version 2 only. | 1431 | This option applies to protocol version 2 only. |
1432 | .Cm ProtocolKeepAlives | ||
1433 | and | ||
1434 | .Cm SetupTimeOut | ||
1435 | are Debian-specific compatibility aliases for this option. | ||
1425 | .It Cm StreamLocalBindMask | 1436 | .It Cm StreamLocalBindMask |
1426 | Sets the octal file creation mode mask | 1437 | Sets the octal file creation mode mask |
1427 | .Pq umask | 1438 | .Pq umask |
@@ -1487,6 +1498,12 @@ Specifies whether the system should send TCP keepalive messages to the | |||
1487 | other side. | 1498 | other side. |
1488 | If they are sent, death of the connection or crash of one | 1499 | If they are sent, death of the connection or crash of one |
1489 | of the machines will be properly noticed. | 1500 | of the machines will be properly noticed. |
1501 | This option only uses TCP keepalives (as opposed to using ssh level | ||
1502 | keepalives), so takes a long time to notice when the connection dies. | ||
1503 | As such, you probably want | ||
1504 | the | ||
1505 | .Cm ServerAliveInterval | ||
1506 | option as well. | ||
1490 | However, this means that | 1507 | However, this means that |
1491 | connections will die if the route is down temporarily, and some people | 1508 | connections will die if the route is down temporarily, and some people |
1492 | find it annoying. | 1509 | find it annoying. |
diff --git a/sshd_config.5 b/sshd_config.5 index 033149695..d14576e69 100644 --- a/sshd_config.5 +++ b/sshd_config.5 | |||
@@ -1392,6 +1392,9 @@ This avoids infinitely hanging sessions. | |||
1392 | .Pp | 1392 | .Pp |
1393 | To disable TCP keepalive messages, the value should be set to | 1393 | To disable TCP keepalive messages, the value should be set to |
1394 | .Dq no . | 1394 | .Dq no . |
1395 | .Pp | ||
1396 | This option was formerly called | ||
1397 | .Cm KeepAlive . | ||
1395 | .It Cm TrustedUserCAKeys | 1398 | .It Cm TrustedUserCAKeys |
1396 | Specifies a file containing public keys of certificate authorities that are | 1399 | Specifies a file containing public keys of certificate authorities that are |
1397 | trusted to sign user certificates for authentication. | 1400 | trusted to sign user certificates for authentication. |