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 522ad373c..46c343f30 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -160,6 +160,7 @@ typedef enum { | |||
160 | oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, | 160 | oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, |
161 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, | 161 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, |
162 | oPubkeyAcceptedKeyTypes, | 162 | oPubkeyAcceptedKeyTypes, |
163 | oProtocolKeepAlives, oSetupTimeOut, | ||
163 | oIgnoredUnknownOption, oDeprecated, oUnsupported | 164 | oIgnoredUnknownOption, oDeprecated, oUnsupported |
164 | } OpCodes; | 165 | } OpCodes; |
165 | 166 | ||
@@ -290,6 +291,8 @@ static struct { | |||
290 | { "hostbasedkeytypes", oHostbasedKeyTypes }, | 291 | { "hostbasedkeytypes", oHostbasedKeyTypes }, |
291 | { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes }, | 292 | { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes }, |
292 | { "ignoreunknown", oIgnoreUnknown }, | 293 | { "ignoreunknown", oIgnoreUnknown }, |
294 | { "protocolkeepalives", oProtocolKeepAlives }, | ||
295 | { "setuptimeout", oSetupTimeOut }, | ||
293 | 296 | ||
294 | { NULL, oBadOption } | 297 | { NULL, oBadOption } |
295 | }; | 298 | }; |
@@ -1304,6 +1307,8 @@ parse_keytypes: | |||
1304 | goto parse_flag; | 1307 | goto parse_flag; |
1305 | 1308 | ||
1306 | case oServerAliveInterval: | 1309 | case oServerAliveInterval: |
1310 | case oProtocolKeepAlives: /* Debian-specific compatibility alias */ | ||
1311 | case oSetupTimeOut: /* Debian-specific compatibility alias */ | ||
1307 | intptr = &options->server_alive_interval; | 1312 | intptr = &options->server_alive_interval; |
1308 | goto parse_time; | 1313 | goto parse_time; |
1309 | 1314 | ||
@@ -1856,8 +1861,13 @@ fill_default_options(Options * options) | |||
1856 | options->rekey_interval = 0; | 1861 | options->rekey_interval = 0; |
1857 | if (options->verify_host_key_dns == -1) | 1862 | if (options->verify_host_key_dns == -1) |
1858 | options->verify_host_key_dns = 0; | 1863 | options->verify_host_key_dns = 0; |
1859 | if (options->server_alive_interval == -1) | 1864 | if (options->server_alive_interval == -1) { |
1860 | options->server_alive_interval = 0; | 1865 | /* in batch mode, default is 5mins */ |
1866 | if (options->batch_mode == 1) | ||
1867 | options->server_alive_interval = 300; | ||
1868 | else | ||
1869 | options->server_alive_interval = 0; | ||
1870 | } | ||
1861 | if (options->server_alive_count_max == -1) | 1871 | if (options->server_alive_count_max == -1) |
1862 | options->server_alive_count_max = 3; | 1872 | options->server_alive_count_max = 3; |
1863 | if (options->control_master == -1) | 1873 | if (options->control_master == -1) |
diff --git a/ssh_config.5 b/ssh_config.5 index 82dcf0c08..f51715931 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 |
@@ -1479,8 +1483,15 @@ from the server, | |||
1479 | will send a message through the encrypted | 1483 | will send a message through the encrypted |
1480 | channel to request a response from the server. | 1484 | channel to request a response from the server. |
1481 | The default | 1485 | The default |
1482 | is 0, indicating that these messages will not be sent to the server. | 1486 | is 0, indicating that these messages will not be sent to the server, |
1487 | or 300 if the | ||
1488 | .Cm BatchMode | ||
1489 | option is set. | ||
1483 | This option applies to protocol version 2 only. | 1490 | This option applies to protocol version 2 only. |
1491 | .Cm ProtocolKeepAlives | ||
1492 | and | ||
1493 | .Cm SetupTimeOut | ||
1494 | are Debian-specific compatibility aliases for this option. | ||
1484 | .It Cm StreamLocalBindMask | 1495 | .It Cm StreamLocalBindMask |
1485 | Sets the octal file creation mode mask | 1496 | Sets the octal file creation mode mask |
1486 | .Pq umask | 1497 | .Pq umask |
@@ -1546,6 +1557,12 @@ Specifies whether the system should send TCP keepalive messages to the | |||
1546 | other side. | 1557 | other side. |
1547 | If they are sent, death of the connection or crash of one | 1558 | If they are sent, death of the connection or crash of one |
1548 | of the machines will be properly noticed. | 1559 | of the machines will be properly noticed. |
1560 | This option only uses TCP keepalives (as opposed to using ssh level | ||
1561 | keepalives), so takes a long time to notice when the connection dies. | ||
1562 | As such, you probably want | ||
1563 | the | ||
1564 | .Cm ServerAliveInterval | ||
1565 | option as well. | ||
1549 | However, this means that | 1566 | However, this means that |
1550 | connections will die if the route is down temporarily, and some people | 1567 | connections will die if the route is down temporarily, and some people |
1551 | find it annoying. | 1568 | find it annoying. |
diff --git a/sshd_config.5 b/sshd_config.5 index 712f62019..154e87ef0 100644 --- a/sshd_config.5 +++ b/sshd_config.5 | |||
@@ -1510,6 +1510,9 @@ This avoids infinitely hanging sessions. | |||
1510 | .Pp | 1510 | .Pp |
1511 | To disable TCP keepalive messages, the value should be set to | 1511 | To disable TCP keepalive messages, the value should be set to |
1512 | .Dq no . | 1512 | .Dq no . |
1513 | .Pp | ||
1514 | This option was formerly called | ||
1515 | .Cm KeepAlive . | ||
1513 | .It Cm TrustedUserCAKeys | 1516 | .It Cm TrustedUserCAKeys |
1514 | Specifies a file containing public keys of certificate authorities that are | 1517 | Specifies a file containing public keys of certificate authorities that are |
1515 | trusted to sign user certificates for authentication, or | 1518 | trusted to sign user certificates for authentication, or |