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 d2b28a41b..45caa0951 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -174,6 +174,7 @@ typedef enum { | |||
174 | oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, | 174 | oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, |
175 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, | 175 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, |
176 | oPubkeyAcceptedKeyTypes, oProxyJump, | 176 | oPubkeyAcceptedKeyTypes, oProxyJump, |
177 | oProtocolKeepAlives, oSetupTimeOut, | ||
177 | oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported | 178 | oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported |
178 | } OpCodes; | 179 | } OpCodes; |
179 | 180 | ||
@@ -318,6 +319,8 @@ static struct { | |||
318 | { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes }, | 319 | { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes }, |
319 | { "ignoreunknown", oIgnoreUnknown }, | 320 | { "ignoreunknown", oIgnoreUnknown }, |
320 | { "proxyjump", oProxyJump }, | 321 | { "proxyjump", oProxyJump }, |
322 | { "protocolkeepalives", oProtocolKeepAlives }, | ||
323 | { "setuptimeout", oSetupTimeOut }, | ||
321 | 324 | ||
322 | { NULL, oBadOption } | 325 | { NULL, oBadOption } |
323 | }; | 326 | }; |
@@ -1406,6 +1409,8 @@ parse_keytypes: | |||
1406 | goto parse_flag; | 1409 | goto parse_flag; |
1407 | 1410 | ||
1408 | case oServerAliveInterval: | 1411 | case oServerAliveInterval: |
1412 | case oProtocolKeepAlives: /* Debian-specific compatibility alias */ | ||
1413 | case oSetupTimeOut: /* Debian-specific compatibility alias */ | ||
1409 | intptr = &options->server_alive_interval; | 1414 | intptr = &options->server_alive_interval; |
1410 | goto parse_time; | 1415 | goto parse_time; |
1411 | 1416 | ||
@@ -2042,8 +2047,13 @@ fill_default_options(Options * options) | |||
2042 | options->rekey_interval = 0; | 2047 | options->rekey_interval = 0; |
2043 | if (options->verify_host_key_dns == -1) | 2048 | if (options->verify_host_key_dns == -1) |
2044 | options->verify_host_key_dns = 0; | 2049 | options->verify_host_key_dns = 0; |
2045 | if (options->server_alive_interval == -1) | 2050 | if (options->server_alive_interval == -1) { |
2046 | options->server_alive_interval = 0; | 2051 | /* in batch mode, default is 5mins */ |
2052 | if (options->batch_mode == 1) | ||
2053 | options->server_alive_interval = 300; | ||
2054 | else | ||
2055 | options->server_alive_interval = 0; | ||
2056 | } | ||
2047 | if (options->server_alive_count_max == -1) | 2057 | if (options->server_alive_count_max == -1) |
2048 | options->server_alive_count_max = 3; | 2058 | options->server_alive_count_max = 3; |
2049 | if (options->control_master == -1) | 2059 | if (options->control_master == -1) |
diff --git a/ssh_config.5 b/ssh_config.5 index 9a06a757a..d6f43c2dd 100644 --- a/ssh_config.5 +++ b/ssh_config.5 | |||
@@ -247,8 +247,12 @@ Valid arguments are | |||
247 | If set to | 247 | If set to |
248 | .Cm yes , | 248 | .Cm yes , |
249 | passphrase/password querying will be disabled. | 249 | passphrase/password querying will be disabled. |
250 | In addition, the | ||
251 | .Cm ServerAliveInterval | ||
252 | option will be set to 300 seconds by default (Debian-specific). | ||
250 | This option is useful in scripts and other batch jobs where no user | 253 | This option is useful in scripts and other batch jobs where no user |
251 | is present to supply the password. | 254 | is present to supply the password, |
255 | and where it is desirable to detect a broken network swiftly. | ||
252 | The argument must be | 256 | The argument must be |
253 | .Cm yes | 257 | .Cm yes |
254 | or | 258 | or |
@@ -1455,7 +1459,14 @@ from the server, | |||
1455 | will send a message through the encrypted | 1459 | will send a message through the encrypted |
1456 | channel to request a response from the server. | 1460 | channel to request a response from the server. |
1457 | The default | 1461 | The default |
1458 | is 0, indicating that these messages will not be sent to the server. | 1462 | is 0, indicating that these messages will not be sent to the server, |
1463 | or 300 if the | ||
1464 | .Cm BatchMode | ||
1465 | option is set (Debian-specific). | ||
1466 | .Cm ProtocolKeepAlives | ||
1467 | and | ||
1468 | .Cm SetupTimeOut | ||
1469 | are Debian-specific compatibility aliases for this option. | ||
1459 | .It Cm StreamLocalBindMask | 1470 | .It Cm StreamLocalBindMask |
1460 | Sets the octal file creation mode mask | 1471 | Sets the octal file creation mode mask |
1461 | .Pq umask | 1472 | .Pq umask |
@@ -1529,6 +1540,12 @@ Specifies whether the system should send TCP keepalive messages to the | |||
1529 | other side. | 1540 | other side. |
1530 | If they are sent, death of the connection or crash of one | 1541 | If they are sent, death of the connection or crash of one |
1531 | of the machines will be properly noticed. | 1542 | of the machines will be properly noticed. |
1543 | This option only uses TCP keepalives (as opposed to using ssh level | ||
1544 | keepalives), so takes a long time to notice when the connection dies. | ||
1545 | As such, you probably want | ||
1546 | the | ||
1547 | .Cm ServerAliveInterval | ||
1548 | option as well. | ||
1532 | However, this means that | 1549 | However, this means that |
1533 | connections will die if the route is down temporarily, and some people | 1550 | connections will die if the route is down temporarily, and some people |
1534 | find it annoying. | 1551 | find it annoying. |
diff --git a/sshd_config.5 b/sshd_config.5 index 0dbcb8daa..7db255522 100644 --- a/sshd_config.5 +++ b/sshd_config.5 | |||
@@ -1454,6 +1454,9 @@ This avoids infinitely hanging sessions. | |||
1454 | .Pp | 1454 | .Pp |
1455 | To disable TCP keepalive messages, the value should be set to | 1455 | To disable TCP keepalive messages, the value should be set to |
1456 | .Cm no . | 1456 | .Cm no . |
1457 | .Pp | ||
1458 | This option was formerly called | ||
1459 | .Cm KeepAlive . | ||
1457 | .It Cm TrustedUserCAKeys | 1460 | .It Cm TrustedUserCAKeys |
1458 | Specifies a file containing public keys of certificate authorities that are | 1461 | Specifies a file containing public keys of certificate authorities that are |
1459 | trusted to sign user certificates for authentication, or | 1462 | trusted to sign user certificates for authentication, or |