summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-06-09 03:01:12 +0000
committerDamien Miller <djm@mindrot.org>2018-06-09 13:11:00 +1000
commit7082bb58a2eb878d23ec674587c742e5e9673c36 (patch)
treeca7c8ddb616358d96279fdbfd5986328f48a1821
parent3b9798bda15bd3f598f5ef07595d64e23504da91 (diff)
upstream: add a SetEnv directive to ssh_config that allows setting
environment variables for the remote session (subject to the server accepting them) refactor SendEnv to remove the arbitrary limit of variable names. ok markus@ OpenBSD-Commit-ID: cfbb00d9b0e10c1ffff1d83424351fd961d1f2be
-rw-r--r--clientloop.c24
-rw-r--r--misc.c32
-rw-r--r--misc.h3
-rw-r--r--mux.c10
-rw-r--r--readconf.c34
-rw-r--r--readconf.h7
-rw-r--r--scp.15
-rw-r--r--sftp.15
-rw-r--r--ssh.15
-rw-r--r--ssh_config.510
-rw-r--r--sshd_config.56
11 files changed, 109 insertions, 32 deletions
diff --git a/clientloop.c b/clientloop.c
index 4801f4a77..247b83979 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.312 2018/04/10 00:10:49 djm Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.313 2018/06/09 03:01:12 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2158,7 +2158,8 @@ void
2158client_session2_setup(struct ssh *ssh, int id, int want_tty, int want_subsystem, 2158client_session2_setup(struct ssh *ssh, int id, int want_tty, int want_subsystem,
2159 const char *term, struct termios *tiop, int in_fd, Buffer *cmd, char **env) 2159 const char *term, struct termios *tiop, int in_fd, Buffer *cmd, char **env)
2160{ 2160{
2161 int len; 2161 int i, j, matched, len;
2162 char *name, *val;
2162 Channel *c = NULL; 2163 Channel *c = NULL;
2163 2164
2164 debug2("%s: id %d", __func__, id); 2165 debug2("%s: id %d", __func__, id);
@@ -2193,9 +2194,6 @@ client_session2_setup(struct ssh *ssh, int id, int want_tty, int want_subsystem,
2193 2194
2194 /* Transfer any environment variables from client to server */ 2195 /* Transfer any environment variables from client to server */
2195 if (options.num_send_env != 0 && env != NULL) { 2196 if (options.num_send_env != 0 && env != NULL) {
2196 int i, j, matched;
2197 char *name, *val;
2198
2199 debug("Sending environment."); 2197 debug("Sending environment.");
2200 for (i = 0; env[i] != NULL; i++) { 2198 for (i = 0; env[i] != NULL; i++) {
2201 /* Split */ 2199 /* Split */
@@ -2227,6 +2225,22 @@ client_session2_setup(struct ssh *ssh, int id, int want_tty, int want_subsystem,
2227 free(name); 2225 free(name);
2228 } 2226 }
2229 } 2227 }
2228 for (i = 0; i < options.num_setenv; i++) {
2229 /* Split */
2230 name = xstrdup(options.setenv[i]);
2231 if ((val = strchr(name, '=')) == NULL) {
2232 free(name);
2233 continue;
2234 }
2235 *val++ = '\0';
2236
2237 debug("Setting env %s = %s", name, val);
2238 channel_request_start(ssh, id, "env", 0);
2239 packet_put_cstring(name);
2240 packet_put_cstring(val);
2241 packet_send();
2242 free(name);
2243 }
2230 2244
2231 len = buffer_len(cmd); 2245 len = buffer_len(cmd);
2232 if (len > 0) { 2246 if (len > 0) {
diff --git a/misc.c b/misc.c
index 3e62320ab..1198e70ca 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.128 2018/06/06 18:29:18 markus Exp $ */ 1/* $OpenBSD: misc.c,v 1.129 2018/06/09 03:01:12 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved. 4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -239,8 +239,8 @@ set_rdomain(int fd, const char *name)
239#define QUOTE "\"" 239#define QUOTE "\""
240 240
241/* return next token in configuration line */ 241/* return next token in configuration line */
242char * 242static char *
243strdelim(char **s) 243strdelim_internal(char **s, int split_equals)
244{ 244{
245 char *old; 245 char *old;
246 int wspace = 0; 246 int wspace = 0;
@@ -250,7 +250,8 @@ strdelim(char **s)
250 250
251 old = *s; 251 old = *s;
252 252
253 *s = strpbrk(*s, WHITESPACE QUOTE "="); 253 *s = strpbrk(*s,
254 split_equals ? WHITESPACE QUOTE "=" : WHITESPACE QUOTE);
254 if (*s == NULL) 255 if (*s == NULL)
255 return (old); 256 return (old);
256 257
@@ -267,18 +268,37 @@ strdelim(char **s)
267 } 268 }
268 269
269 /* Allow only one '=' to be skipped */ 270 /* Allow only one '=' to be skipped */
270 if (*s[0] == '=') 271 if (split_equals && *s[0] == '=')
271 wspace = 1; 272 wspace = 1;
272 *s[0] = '\0'; 273 *s[0] = '\0';
273 274
274 /* Skip any extra whitespace after first token */ 275 /* Skip any extra whitespace after first token */
275 *s += strspn(*s + 1, WHITESPACE) + 1; 276 *s += strspn(*s + 1, WHITESPACE) + 1;
276 if (*s[0] == '=' && !wspace) 277 if (split_equals && *s[0] == '=' && !wspace)
277 *s += strspn(*s + 1, WHITESPACE) + 1; 278 *s += strspn(*s + 1, WHITESPACE) + 1;
278 279
279 return (old); 280 return (old);
280} 281}
281 282
283/*
284 * Return next token in configuration line; splts on whitespace or a
285 * single '=' character.
286 */
287char *
288strdelim(char **s)
289{
290 return strdelim_internal(s, 1);
291}
292
293/*
294 * Return next token in configuration line; splts on whitespace only.
295 */
296char *
297strdelimw(char **s)
298{
299 return strdelim_internal(s, 0);
300}
301
282struct passwd * 302struct passwd *
283pwcopy(struct passwd *pw) 303pwcopy(struct passwd *pw)
284{ 304{
diff --git a/misc.h b/misc.h
index daa4abc4c..837b005aa 100644
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.h,v 1.72 2018/06/06 18:29:18 markus Exp $ */ 1/* $OpenBSD: misc.h,v 1.73 2018/06/09 03:01:12 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -45,6 +45,7 @@ struct ForwardOptions {
45 45
46char *chop(char *); 46char *chop(char *);
47char *strdelim(char **); 47char *strdelim(char **);
48char *strdelimw(char **);
48int set_nonblock(int); 49int set_nonblock(int);
49int unset_nonblock(int); 50int unset_nonblock(int);
50void set_nodelay(int); 51void set_nodelay(int);
diff --git a/mux.c b/mux.c
index c591cb154..8433cd8e5 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mux.c,v 1.70 2018/06/06 18:22:41 djm Exp $ */ 1/* $OpenBSD: mux.c,v 1.71 2018/06/09 03:01:12 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -1852,9 +1852,9 @@ mux_client_request_session(int fd)
1852{ 1852{
1853 Buffer m; 1853 Buffer m;
1854 char *e, *term; 1854 char *e, *term;
1855 u_int i, rid, sid, esid, exitval, type, exitval_seen; 1855 u_int rid, sid, esid, exitval, type, exitval_seen;
1856 extern char **environ; 1856 extern char **environ;
1857 int devnull, rawmode; 1857 int i, devnull, rawmode;
1858 1858
1859 debug3("%s: entering", __func__); 1859 debug3("%s: entering", __func__);
1860 1860
@@ -1889,14 +1889,16 @@ mux_client_request_session(int fd)
1889 buffer_put_cstring(&m, term == NULL ? "" : term); 1889 buffer_put_cstring(&m, term == NULL ? "" : term);
1890 buffer_put_string(&m, buffer_ptr(&command), buffer_len(&command)); 1890 buffer_put_string(&m, buffer_ptr(&command), buffer_len(&command));
1891 1891
1892 /* Pass environment */
1892 if (options.num_send_env > 0 && environ != NULL) { 1893 if (options.num_send_env > 0 && environ != NULL) {
1893 /* Pass environment */
1894 for (i = 0; environ[i] != NULL; i++) { 1894 for (i = 0; environ[i] != NULL; i++) {
1895 if (env_permitted(environ[i])) { 1895 if (env_permitted(environ[i])) {
1896 buffer_put_cstring(&m, environ[i]); 1896 buffer_put_cstring(&m, environ[i]);
1897 } 1897 }
1898 } 1898 }
1899 } 1899 }
1900 for (i = 0; i < options.num_setenv; i++)
1901 buffer_put_cstring(&m, options.setenv[i]);
1900 1902
1901 if (mux_client_write_packet(fd, &m) != 0) 1903 if (mux_client_write_packet(fd, &m) != 0)
1902 fatal("%s: write packet: %s", __func__, strerror(errno)); 1904 fatal("%s: write packet: %s", __func__, strerror(errno));
diff --git a/readconf.c b/readconf.c
index 733b67f76..8ff23c05c 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.289 2018/06/06 18:29:18 markus Exp $ */ 1/* $OpenBSD: readconf.c,v 1.290 2018/06/09 03:01:12 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -161,7 +161,7 @@ typedef enum {
161 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, 161 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
162 oAddressFamily, oGssAuthentication, oGssDelegateCreds, 162 oAddressFamily, oGssAuthentication, oGssDelegateCreds,
163 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly, 163 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
164 oSendEnv, oControlPath, oControlMaster, oControlPersist, 164 oSendEnv, oSetEnv, oControlPath, oControlMaster, oControlPersist,
165 oHashKnownHosts, 165 oHashKnownHosts,
166 oTunnel, oTunnelDevice, 166 oTunnel, oTunnelDevice,
167 oLocalCommand, oPermitLocalCommand, oRemoteCommand, 167 oLocalCommand, oPermitLocalCommand, oRemoteCommand,
@@ -277,6 +277,7 @@ static struct {
277 { "serveraliveinterval", oServerAliveInterval }, 277 { "serveraliveinterval", oServerAliveInterval },
278 { "serveralivecountmax", oServerAliveCountMax }, 278 { "serveralivecountmax", oServerAliveCountMax },
279 { "sendenv", oSendEnv }, 279 { "sendenv", oSendEnv },
280 { "setenv", oSetEnv },
280 { "controlpath", oControlPath }, 281 { "controlpath", oControlPath },
281 { "controlmaster", oControlMaster }, 282 { "controlmaster", oControlMaster },
282 { "controlpersist", oControlPersist }, 283 { "controlpersist", oControlPersist },
@@ -1398,15 +1399,38 @@ parse_keytypes:
1398 continue; 1399 continue;
1399 } else { 1400 } else {
1400 /* Adding an env var */ 1401 /* Adding an env var */
1401 if (options->num_send_env >= MAX_SEND_ENV) 1402 if (options->num_send_env >= INT_MAX)
1402 fatal("%s line %d: too many send env.", 1403 fatal("%s line %d: too many send env.",
1403 filename, linenum); 1404 filename, linenum);
1405 options->send_env = xrecallocarray(
1406 options->send_env, options->num_send_env,
1407 options->num_send_env,
1408 sizeof(*options->send_env));
1404 options->send_env[options->num_send_env++] = 1409 options->send_env[options->num_send_env++] =
1405 xstrdup(arg); 1410 xstrdup(arg);
1406 } 1411 }
1407 } 1412 }
1408 break; 1413 break;
1409 1414
1415 case oSetEnv:
1416 value = options->num_setenv;
1417 while ((arg = strdelimw(&s)) != NULL && *arg != '\0') {
1418 if (strchr(arg, '=') == NULL)
1419 fatal("%s line %d: Invalid SetEnv.",
1420 filename, linenum);
1421 if (!*activep || value != 0)
1422 continue;
1423 /* Adding a setenv var */
1424 if (options->num_setenv >= INT_MAX)
1425 fatal("%s line %d: too many SetEnv.",
1426 filename, linenum);
1427 options->setenv = xrecallocarray(
1428 options->setenv, options->num_setenv,
1429 options->num_setenv + 1, sizeof(*options->setenv));
1430 options->setenv[options->num_setenv++] = xstrdup(arg);
1431 }
1432 break;
1433
1410 case oControlPath: 1434 case oControlPath:
1411 charptr = &options->control_path; 1435 charptr = &options->control_path;
1412 goto parse_string; 1436 goto parse_string;
@@ -1855,7 +1879,10 @@ initialize_options(Options * options)
1855 options->verify_host_key_dns = -1; 1879 options->verify_host_key_dns = -1;
1856 options->server_alive_interval = -1; 1880 options->server_alive_interval = -1;
1857 options->server_alive_count_max = -1; 1881 options->server_alive_count_max = -1;
1882 options->send_env = NULL;
1858 options->num_send_env = 0; 1883 options->num_send_env = 0;
1884 options->setenv = NULL;
1885 options->num_setenv = 0;
1859 options->control_path = NULL; 1886 options->control_path = NULL;
1860 options->control_master = -1; 1887 options->control_master = -1;
1861 options->control_persist = -1; 1888 options->control_persist = -1;
@@ -2606,6 +2633,7 @@ dump_client_config(Options *o, const char *host)
2606 dump_cfg_strarray_oneline(oGlobalKnownHostsFile, o->num_system_hostfiles, o->system_hostfiles); 2633 dump_cfg_strarray_oneline(oGlobalKnownHostsFile, o->num_system_hostfiles, o->system_hostfiles);
2607 dump_cfg_strarray_oneline(oUserKnownHostsFile, o->num_user_hostfiles, o->user_hostfiles); 2634 dump_cfg_strarray_oneline(oUserKnownHostsFile, o->num_user_hostfiles, o->user_hostfiles);
2608 dump_cfg_strarray(oSendEnv, o->num_send_env, o->send_env); 2635 dump_cfg_strarray(oSendEnv, o->num_send_env, o->send_env);
2636 dump_cfg_strarray(oSetEnv, o->num_setenv, o->setenv);
2609 2637
2610 /* Special cases */ 2638 /* Special cases */
2611 2639
diff --git a/readconf.h b/readconf.h
index f4d9e2b26..d8595f07e 100644
--- a/readconf.h
+++ b/readconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.h,v 1.125 2018/02/23 02:34:33 djm Exp $ */ 1/* $OpenBSD: readconf.h,v 1.126 2018/06/09 03:01:12 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -18,7 +18,6 @@
18 18
19/* Data structure for representing option data. */ 19/* Data structure for representing option data. */
20 20
21#define MAX_SEND_ENV 256
22#define SSH_MAX_HOSTS_FILES 32 21#define SSH_MAX_HOSTS_FILES 32
23#define MAX_CANON_DOMAINS 32 22#define MAX_CANON_DOMAINS 32
24#define PATH_MAX_SUN (sizeof((struct sockaddr_un *)0)->sun_path) 23#define PATH_MAX_SUN (sizeof((struct sockaddr_un *)0)->sun_path)
@@ -120,7 +119,9 @@ typedef struct {
120 int server_alive_count_max; 119 int server_alive_count_max;
121 120
122 int num_send_env; 121 int num_send_env;
123 char *send_env[MAX_SEND_ENV]; 122 char **send_env;
123 int num_setenv;
124 char **setenv;
124 125
125 char *control_path; 126 char *control_path;
126 int control_master; 127 int control_master;
diff --git a/scp.1 b/scp.1
index 8d251e34a..b8886be64 100644
--- a/scp.1
+++ b/scp.1
@@ -8,9 +8,9 @@
8.\" 8.\"
9.\" Created: Sun May 7 00:14:37 1995 ylo 9.\" Created: Sun May 7 00:14:37 1995 ylo
10.\" 10.\"
11.\" $OpenBSD: scp.1,v 1.77 2018/02/23 07:38:09 jmc Exp $ 11.\" $OpenBSD: scp.1,v 1.78 2018/06/09 03:01:12 djm Exp $
12.\" 12.\"
13.Dd $Mdocdate: February 23 2018 $ 13.Dd $Mdocdate: June 9 2018 $
14.Dt SCP 1 14.Dt SCP 1
15.Os 15.Os
16.Sh NAME 16.Sh NAME
@@ -171,6 +171,7 @@ For full details of the options listed below, and their possible values, see
171.It PubkeyAuthentication 171.It PubkeyAuthentication
172.It RekeyLimit 172.It RekeyLimit
173.It SendEnv 173.It SendEnv
174.It SetEnv
174.It ServerAliveInterval 175.It ServerAliveInterval
175.It ServerAliveCountMax 176.It ServerAliveCountMax
176.It StrictHostKeyChecking 177.It StrictHostKeyChecking
diff --git a/sftp.1 b/sftp.1
index 43e0442f7..686844b46 100644
--- a/sftp.1
+++ b/sftp.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp.1,v 1.114 2018/02/23 07:38:09 jmc Exp $ 1.\" $OpenBSD: sftp.1,v 1.115 2018/06/09 03:01:12 djm Exp $
2.\" 2.\"
3.\" Copyright (c) 2001 Damien Miller. All rights reserved. 3.\" Copyright (c) 2001 Damien Miller. All rights reserved.
4.\" 4.\"
@@ -22,7 +22,7 @@
22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24.\" 24.\"
25.Dd $Mdocdate: February 23 2018 $ 25.Dd $Mdocdate: June 9 2018 $
26.Dt SFTP 1 26.Dt SFTP 1
27.Os 27.Os
28.Sh NAME 28.Sh NAME
@@ -241,6 +241,7 @@ For full details of the options listed below, and their possible values, see
241.It PubkeyAuthentication 241.It PubkeyAuthentication
242.It RekeyLimit 242.It RekeyLimit
243.It SendEnv 243.It SendEnv
244.It SetEnv
244.It ServerAliveInterval 245.It ServerAliveInterval
245.It ServerAliveCountMax 246.It ServerAliveCountMax
246.It StrictHostKeyChecking 247.It StrictHostKeyChecking
diff --git a/ssh.1 b/ssh.1
index 40034463f..65f4e3966 100644
--- a/ssh.1
+++ b/ssh.1
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: ssh.1,v 1.393 2018/05/11 04:01:11 djm Exp $ 36.\" $OpenBSD: ssh.1,v 1.394 2018/06/09 03:01:12 djm Exp $
37.Dd $Mdocdate: May 11 2018 $ 37.Dd $Mdocdate: June 9 2018 $
38.Dt SSH 1 38.Dt SSH 1
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -525,6 +525,7 @@ For full details of the options listed below, and their possible values, see
525.It RemoteForward 525.It RemoteForward
526.It RequestTTY 526.It RequestTTY
527.It SendEnv 527.It SendEnv
528.It SetEnv
528.It ServerAliveInterval 529.It ServerAliveInterval
529.It ServerAliveCountMax 530.It ServerAliveCountMax
530.It StreamLocalBindMask 531.It StreamLocalBindMask
diff --git a/ssh_config.5 b/ssh_config.5
index f6f36c45f..20a60a2d5 100644
--- a/ssh_config.5
+++ b/ssh_config.5
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: ssh_config.5,v 1.275 2018/06/01 06:23:10 jmc Exp $ 36.\" $OpenBSD: ssh_config.5,v 1.276 2018/06/09 03:01:12 djm Exp $
37.Dd $Mdocdate: June 1 2018 $ 37.Dd $Mdocdate: June 9 2018 $
38.Dt SSH_CONFIG 5 38.Dt SSH_CONFIG 5
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -1404,6 +1404,12 @@ It is possible to clear previously set
1404variable names by prefixing patterns with 1404variable names by prefixing patterns with
1405.Pa - . 1405.Pa - .
1406The default is not to send any environment variables. 1406The default is not to send any environment variables.
1407.It Cm SetEnv
1408Directly specify one or more environment variables and their contents to
1409be sent to the server.
1410Similarly to
1411.Cm SendEnv ,
1412the server must be prepared to accept the environment variable.
1407.It Cm ServerAliveCountMax 1413.It Cm ServerAliveCountMax
1408Sets the number of server alive messages (see below) which may be 1414Sets the number of server alive messages (see below) which may be
1409sent without 1415sent without
diff --git a/sshd_config.5 b/sshd_config.5
index 7cf7e63db..395f5f6ac 100644
--- a/sshd_config.5
+++ b/sshd_config.5
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: sshd_config.5,v 1.272 2018/06/07 11:26:14 jmc Exp $ 36.\" $OpenBSD: sshd_config.5,v 1.273 2018/06/09 03:01:12 djm Exp $
37.Dd $Mdocdate: June 7 2018 $ 37.Dd $Mdocdate: June 9 2018 $
38.Dt SSHD_CONFIG 5 38.Dt SSHD_CONFIG 5
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -66,6 +66,8 @@ the session's
66.Xr environ 7 . 66.Xr environ 7 .
67See 67See
68.Cm SendEnv 68.Cm SendEnv
69and
70.Cm SetEnv
69in 71in
70.Xr ssh_config 5 72.Xr ssh_config 5
71for how to configure the client. 73for how to configure the client.