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 b069333fa..3d0a812b3 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -176,6 +176,7 @@ typedef enum { | |||
176 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, | 176 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, |
177 | oPubkeyAcceptedKeyTypes, oCASignatureAlgorithms, oProxyJump, | 177 | oPubkeyAcceptedKeyTypes, oCASignatureAlgorithms, oProxyJump, |
178 | oSecurityKeyProvider, | 178 | oSecurityKeyProvider, |
179 | oProtocolKeepAlives, oSetupTimeOut, | ||
179 | oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported | 180 | oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported |
180 | } OpCodes; | 181 | } OpCodes; |
181 | 182 | ||
@@ -326,6 +327,8 @@ static struct { | |||
326 | { "ignoreunknown", oIgnoreUnknown }, | 327 | { "ignoreunknown", oIgnoreUnknown }, |
327 | { "proxyjump", oProxyJump }, | 328 | { "proxyjump", oProxyJump }, |
328 | { "securitykeyprovider", oSecurityKeyProvider }, | 329 | { "securitykeyprovider", oSecurityKeyProvider }, |
330 | { "protocolkeepalives", oProtocolKeepAlives }, | ||
331 | { "setuptimeout", oSetupTimeOut }, | ||
329 | 332 | ||
330 | { NULL, oBadOption } | 333 | { NULL, oBadOption } |
331 | }; | 334 | }; |
@@ -1534,6 +1537,8 @@ parse_keytypes: | |||
1534 | goto parse_flag; | 1537 | goto parse_flag; |
1535 | 1538 | ||
1536 | case oServerAliveInterval: | 1539 | case oServerAliveInterval: |
1540 | case oProtocolKeepAlives: /* Debian-specific compatibility alias */ | ||
1541 | case oSetupTimeOut: /* Debian-specific compatibility alias */ | ||
1537 | intptr = &options->server_alive_interval; | 1542 | intptr = &options->server_alive_interval; |
1538 | goto parse_time; | 1543 | goto parse_time; |
1539 | 1544 | ||
@@ -2266,8 +2271,13 @@ fill_default_options(Options * options) | |||
2266 | options->rekey_interval = 0; | 2271 | options->rekey_interval = 0; |
2267 | if (options->verify_host_key_dns == -1) | 2272 | if (options->verify_host_key_dns == -1) |
2268 | options->verify_host_key_dns = 0; | 2273 | options->verify_host_key_dns = 0; |
2269 | if (options->server_alive_interval == -1) | 2274 | if (options->server_alive_interval == -1) { |
2270 | options->server_alive_interval = 0; | 2275 | /* in batch mode, default is 5mins */ |
2276 | if (options->batch_mode == 1) | ||
2277 | options->server_alive_interval = 300; | ||
2278 | else | ||
2279 | options->server_alive_interval = 0; | ||
2280 | } | ||
2271 | if (options->server_alive_count_max == -1) | 2281 | if (options->server_alive_count_max == -1) |
2272 | options->server_alive_count_max = 3; | 2282 | options->server_alive_count_max = 3; |
2273 | if (options->control_master == -1) | 2283 | if (options->control_master == -1) |
diff --git a/ssh_config.5 b/ssh_config.5 index bd86d000c..3ceb800ba 100644 --- a/ssh_config.5 +++ b/ssh_config.5 | |||
@@ -275,9 +275,13 @@ If set to | |||
275 | .Cm yes , | 275 | .Cm yes , |
276 | user interaction such as password prompts and host key confirmation requests | 276 | user interaction such as password prompts and host key confirmation requests |
277 | will be disabled. | 277 | will be disabled. |
278 | In addition, the | ||
279 | .Cm ServerAliveInterval | ||
280 | option will be set to 300 seconds by default (Debian-specific). | ||
278 | This option is useful in scripts and other batch jobs where no user | 281 | This option is useful in scripts and other batch jobs where no user |
279 | is present to interact with | 282 | is present to interact with |
280 | .Xr ssh 1 . | 283 | .Xr ssh 1 , |
284 | and where it is desirable to detect a broken network swiftly. | ||
281 | The argument must be | 285 | The argument must be |
282 | .Cm yes | 286 | .Cm yes |
283 | or | 287 | or |
@@ -1624,7 +1628,14 @@ from the server, | |||
1624 | will send a message through the encrypted | 1628 | will send a message through the encrypted |
1625 | channel to request a response from the server. | 1629 | channel to request a response from the server. |
1626 | The default | 1630 | The default |
1627 | is 0, indicating that these messages will not be sent to the server. | 1631 | is 0, indicating that these messages will not be sent to the server, |
1632 | or 300 if the | ||
1633 | .Cm BatchMode | ||
1634 | option is set (Debian-specific). | ||
1635 | .Cm ProtocolKeepAlives | ||
1636 | and | ||
1637 | .Cm SetupTimeOut | ||
1638 | are Debian-specific compatibility aliases for this option. | ||
1628 | .It Cm SetEnv | 1639 | .It Cm SetEnv |
1629 | Directly specify one or more environment variables and their contents to | 1640 | Directly specify one or more environment variables and their contents to |
1630 | be sent to the server. | 1641 | be sent to the server. |
@@ -1704,6 +1715,12 @@ Specifies whether the system should send TCP keepalive messages to the | |||
1704 | other side. | 1715 | other side. |
1705 | If they are sent, death of the connection or crash of one | 1716 | If they are sent, death of the connection or crash of one |
1706 | of the machines will be properly noticed. | 1717 | of the machines will be properly noticed. |
1718 | This option only uses TCP keepalives (as opposed to using ssh level | ||
1719 | keepalives), so takes a long time to notice when the connection dies. | ||
1720 | As such, you probably want | ||
1721 | the | ||
1722 | .Cm ServerAliveInterval | ||
1723 | option as well. | ||
1707 | However, this means that | 1724 | However, this means that |
1708 | connections will die if the route is down temporarily, and some people | 1725 | connections will die if the route is down temporarily, and some people |
1709 | find it annoying. | 1726 | find it annoying. |
diff --git a/sshd_config.5 b/sshd_config.5 index eabbe9e73..6457620bb 100644 --- a/sshd_config.5 +++ b/sshd_config.5 | |||
@@ -1691,6 +1691,9 @@ This avoids infinitely hanging sessions. | |||
1691 | .Pp | 1691 | .Pp |
1692 | To disable TCP keepalive messages, the value should be set to | 1692 | To disable TCP keepalive messages, the value should be set to |
1693 | .Cm no . | 1693 | .Cm no . |
1694 | .Pp | ||
1695 | This option was formerly called | ||
1696 | .Cm KeepAlive . | ||
1694 | .It Cm TrustedUserCAKeys | 1697 | .It Cm TrustedUserCAKeys |
1695 | Specifies a file containing public keys of certificate authorities that are | 1698 | Specifies a file containing public keys of certificate authorities that are |
1696 | trusted to sign user certificates for authentication, or | 1699 | trusted to sign user certificates for authentication, or |