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 6e26ba32d..3fd0fe7b7 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -175,6 +175,7 @@ typedef enum { | |||
175 | oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, | 175 | oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, |
176 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, | 176 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, |
177 | oPubkeyAcceptedKeyTypes, oProxyJump, | 177 | oPubkeyAcceptedKeyTypes, oProxyJump, |
178 | oProtocolKeepAlives, oSetupTimeOut, | ||
178 | oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported | 179 | oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported |
179 | } OpCodes; | 180 | } OpCodes; |
180 | 181 | ||
@@ -321,6 +322,8 @@ static struct { | |||
321 | { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes }, | 322 | { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes }, |
322 | { "ignoreunknown", oIgnoreUnknown }, | 323 | { "ignoreunknown", oIgnoreUnknown }, |
323 | { "proxyjump", oProxyJump }, | 324 | { "proxyjump", oProxyJump }, |
325 | { "protocolkeepalives", oProtocolKeepAlives }, | ||
326 | { "setuptimeout", oSetupTimeOut }, | ||
324 | 327 | ||
325 | { NULL, oBadOption } | 328 | { NULL, oBadOption } |
326 | }; | 329 | }; |
@@ -1401,6 +1404,8 @@ parse_keytypes: | |||
1401 | goto parse_flag; | 1404 | goto parse_flag; |
1402 | 1405 | ||
1403 | case oServerAliveInterval: | 1406 | case oServerAliveInterval: |
1407 | case oProtocolKeepAlives: /* Debian-specific compatibility alias */ | ||
1408 | case oSetupTimeOut: /* Debian-specific compatibility alias */ | ||
1404 | intptr = &options->server_alive_interval; | 1409 | intptr = &options->server_alive_interval; |
1405 | goto parse_time; | 1410 | goto parse_time; |
1406 | 1411 | ||
@@ -2075,8 +2080,13 @@ fill_default_options(Options * options) | |||
2075 | options->rekey_interval = 0; | 2080 | options->rekey_interval = 0; |
2076 | if (options->verify_host_key_dns == -1) | 2081 | if (options->verify_host_key_dns == -1) |
2077 | options->verify_host_key_dns = 0; | 2082 | options->verify_host_key_dns = 0; |
2078 | if (options->server_alive_interval == -1) | 2083 | if (options->server_alive_interval == -1) { |
2079 | options->server_alive_interval = 0; | 2084 | /* in batch mode, default is 5mins */ |
2085 | if (options->batch_mode == 1) | ||
2086 | options->server_alive_interval = 300; | ||
2087 | else | ||
2088 | options->server_alive_interval = 0; | ||
2089 | } | ||
2080 | if (options->server_alive_count_max == -1) | 2090 | if (options->server_alive_count_max == -1) |
2081 | options->server_alive_count_max = 3; | 2091 | options->server_alive_count_max = 3; |
2082 | if (options->control_master == -1) | 2092 | if (options->control_master == -1) |
diff --git a/ssh_config.5 b/ssh_config.5 index 5b99921b4..86ada128e 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 |
@@ -1463,7 +1467,14 @@ from the server, | |||
1463 | will send a message through the encrypted | 1467 | will send a message through the encrypted |
1464 | channel to request a response from the server. | 1468 | channel to request a response from the server. |
1465 | The default | 1469 | The default |
1466 | is 0, indicating that these messages will not be sent to the server. | 1470 | is 0, indicating that these messages will not be sent to the server, |
1471 | or 300 if the | ||
1472 | .Cm BatchMode | ||
1473 | option is set (Debian-specific). | ||
1474 | .Cm ProtocolKeepAlives | ||
1475 | and | ||
1476 | .Cm SetupTimeOut | ||
1477 | are Debian-specific compatibility aliases for this option. | ||
1467 | .It Cm SetEnv | 1478 | .It Cm SetEnv |
1468 | Directly specify one or more environment variables and their contents to | 1479 | Directly specify one or more environment variables and their contents to |
1469 | be sent to the server. | 1480 | be sent to the server. |
@@ -1543,6 +1554,12 @@ Specifies whether the system should send TCP keepalive messages to the | |||
1543 | other side. | 1554 | other side. |
1544 | If they are sent, death of the connection or crash of one | 1555 | If they are sent, death of the connection or crash of one |
1545 | of the machines will be properly noticed. | 1556 | of the machines will be properly noticed. |
1557 | This option only uses TCP keepalives (as opposed to using ssh level | ||
1558 | keepalives), so takes a long time to notice when the connection dies. | ||
1559 | As such, you probably want | ||
1560 | the | ||
1561 | .Cm ServerAliveInterval | ||
1562 | option as well. | ||
1546 | However, this means that | 1563 | However, this means that |
1547 | connections will die if the route is down temporarily, and some people | 1564 | connections will die if the route is down temporarily, and some people |
1548 | find it annoying. | 1565 | find it annoying. |
diff --git a/sshd_config.5 b/sshd_config.5 index a0ac717c7..0fbbccbde 100644 --- a/sshd_config.5 +++ b/sshd_config.5 | |||
@@ -1566,6 +1566,9 @@ This avoids infinitely hanging sessions. | |||
1566 | .Pp | 1566 | .Pp |
1567 | To disable TCP keepalive messages, the value should be set to | 1567 | To disable TCP keepalive messages, the value should be set to |
1568 | .Cm no . | 1568 | .Cm no . |
1569 | .Pp | ||
1570 | This option was formerly called | ||
1571 | .Cm KeepAlive . | ||
1569 | .It Cm TrustedUserCAKeys | 1572 | .It Cm TrustedUserCAKeys |
1570 | Specifies a file containing public keys of certificate authorities that are | 1573 | Specifies a file containing public keys of certificate authorities that are |
1571 | trusted to sign user certificates for authentication, or | 1574 | trusted to sign user certificates for authentication, or |