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 559e4c7d0..fde6b418a 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -161,6 +161,7 @@ typedef enum { | |||
161 | oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, | 161 | oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, |
162 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, | 162 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, |
163 | oPubkeyAcceptedKeyTypes, | 163 | oPubkeyAcceptedKeyTypes, |
164 | oProtocolKeepAlives, oSetupTimeOut, | ||
164 | oIgnoredUnknownOption, oDeprecated, oUnsupported | 165 | oIgnoredUnknownOption, oDeprecated, oUnsupported |
165 | } OpCodes; | 166 | } OpCodes; |
166 | 167 | ||
@@ -293,6 +294,8 @@ static struct { | |||
293 | { "hostbasedkeytypes", oHostbasedKeyTypes }, | 294 | { "hostbasedkeytypes", oHostbasedKeyTypes }, |
294 | { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes }, | 295 | { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes }, |
295 | { "ignoreunknown", oIgnoreUnknown }, | 296 | { "ignoreunknown", oIgnoreUnknown }, |
297 | { "protocolkeepalives", oProtocolKeepAlives }, | ||
298 | { "setuptimeout", oSetupTimeOut }, | ||
296 | 299 | ||
297 | { NULL, oBadOption } | 300 | { NULL, oBadOption } |
298 | }; | 301 | }; |
@@ -1350,6 +1353,8 @@ parse_keytypes: | |||
1350 | goto parse_flag; | 1353 | goto parse_flag; |
1351 | 1354 | ||
1352 | case oServerAliveInterval: | 1355 | case oServerAliveInterval: |
1356 | case oProtocolKeepAlives: /* Debian-specific compatibility alias */ | ||
1357 | case oSetupTimeOut: /* Debian-specific compatibility alias */ | ||
1353 | intptr = &options->server_alive_interval; | 1358 | intptr = &options->server_alive_interval; |
1354 | goto parse_time; | 1359 | goto parse_time; |
1355 | 1360 | ||
@@ -1906,8 +1911,13 @@ fill_default_options(Options * options) | |||
1906 | options->rekey_interval = 0; | 1911 | options->rekey_interval = 0; |
1907 | if (options->verify_host_key_dns == -1) | 1912 | if (options->verify_host_key_dns == -1) |
1908 | options->verify_host_key_dns = 0; | 1913 | options->verify_host_key_dns = 0; |
1909 | if (options->server_alive_interval == -1) | 1914 | if (options->server_alive_interval == -1) { |
1910 | options->server_alive_interval = 0; | 1915 | /* in batch mode, default is 5mins */ |
1916 | if (options->batch_mode == 1) | ||
1917 | options->server_alive_interval = 300; | ||
1918 | else | ||
1919 | options->server_alive_interval = 0; | ||
1920 | } | ||
1911 | if (options->server_alive_count_max == -1) | 1921 | if (options->server_alive_count_max == -1) |
1912 | options->server_alive_count_max = 3; | 1922 | options->server_alive_count_max = 3; |
1913 | if (options->control_master == -1) | 1923 | if (options->control_master == -1) |
diff --git a/ssh_config.5 b/ssh_config.5 index 9060d5be2..bbf638b53 100644 --- a/ssh_config.5 +++ b/ssh_config.5 | |||
@@ -268,8 +268,12 @@ The default is | |||
268 | If set to | 268 | If set to |
269 | .Dq yes , | 269 | .Dq yes , |
270 | passphrase/password querying will be disabled. | 270 | passphrase/password querying will be disabled. |
271 | In addition, the | ||
272 | .Cm ServerAliveInterval | ||
273 | option will be set to 300 seconds by default. | ||
271 | This option is useful in scripts and other batch jobs where no user | 274 | This option is useful in scripts and other batch jobs where no user |
272 | is present to supply the password. | 275 | is present to supply the password, |
276 | and where it is desirable to detect a broken network swiftly. | ||
273 | The argument must be | 277 | The argument must be |
274 | .Dq yes | 278 | .Dq yes |
275 | or | 279 | or |
@@ -1551,7 +1555,14 @@ from the server, | |||
1551 | will send a message through the encrypted | 1555 | will send a message through the encrypted |
1552 | channel to request a response from the server. | 1556 | channel to request a response from the server. |
1553 | The default | 1557 | The default |
1554 | is 0, indicating that these messages will not be sent to the server. | 1558 | is 0, indicating that these messages will not be sent to the server, |
1559 | or 300 if the | ||
1560 | .Cm BatchMode | ||
1561 | option is set. | ||
1562 | .Cm ProtocolKeepAlives | ||
1563 | and | ||
1564 | .Cm SetupTimeOut | ||
1565 | are Debian-specific compatibility aliases for this option. | ||
1555 | .It Cm StreamLocalBindMask | 1566 | .It Cm StreamLocalBindMask |
1556 | Sets the octal file creation mode mask | 1567 | Sets the octal file creation mode mask |
1557 | .Pq umask | 1568 | .Pq umask |
@@ -1617,6 +1628,12 @@ Specifies whether the system should send TCP keepalive messages to the | |||
1617 | other side. | 1628 | other side. |
1618 | If they are sent, death of the connection or crash of one | 1629 | If they are sent, death of the connection or crash of one |
1619 | of the machines will be properly noticed. | 1630 | of the machines will be properly noticed. |
1631 | This option only uses TCP keepalives (as opposed to using ssh level | ||
1632 | keepalives), so takes a long time to notice when the connection dies. | ||
1633 | As such, you probably want | ||
1634 | the | ||
1635 | .Cm ServerAliveInterval | ||
1636 | option as well. | ||
1620 | However, this means that | 1637 | However, this means that |
1621 | connections will die if the route is down temporarily, and some people | 1638 | connections will die if the route is down temporarily, and some people |
1622 | find it annoying. | 1639 | find it annoying. |
diff --git a/sshd_config.5 b/sshd_config.5 index c6d6858f9..bc79a6636 100644 --- a/sshd_config.5 +++ b/sshd_config.5 | |||
@@ -1518,6 +1518,9 @@ This avoids infinitely hanging sessions. | |||
1518 | .Pp | 1518 | .Pp |
1519 | To disable TCP keepalive messages, the value should be set to | 1519 | To disable TCP keepalive messages, the value should be set to |
1520 | .Dq no . | 1520 | .Dq no . |
1521 | .Pp | ||
1522 | This option was formerly called | ||
1523 | .Cm KeepAlive . | ||
1521 | .It Cm TrustedUserCAKeys | 1524 | .It Cm TrustedUserCAKeys |
1522 | Specifies a file containing public keys of certificate authorities that are | 1525 | Specifies a file containing public keys of certificate authorities that are |
1523 | trusted to sign user certificates for authentication, or | 1526 | trusted to sign user certificates for authentication, or |