Annotation of src/usr.bin/ssh/sshd_config.5, Revision 1.180
1.1 stevesk 1: .\"
2: .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
3: .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4: .\" All rights reserved
5: .\"
6: .\" As far as I am concerned, the code I have written for this software
7: .\" can be used freely for any purpose. Any derived versions of this
8: .\" software must be clearly marked as such, and if the derived work is
9: .\" incompatible with the protocol description in the RFC file, it must be
10: .\" called by a name other than "ssh" or "Secure Shell".
11: .\"
12: .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
13: .\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
14: .\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
15: .\"
16: .\" Redistribution and use in source and binary forms, with or without
17: .\" modification, are permitted provided that the following conditions
18: .\" are met:
19: .\" 1. Redistributions of source code must retain the above copyright
20: .\" notice, this list of conditions and the following disclaimer.
21: .\" 2. Redistributions in binary form must reproduce the above copyright
22: .\" notice, this list of conditions and the following disclaimer in the
23: .\" documentation and/or other materials provided with the distribution.
24: .\"
25: .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28: .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
29: .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30: .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31: .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32: .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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.
35: .\"
1.180 ! jmc 36: .\" $OpenBSD: sshd_config.5,v 1.179 2014/11/22 18:15:41 deraadt Exp $
! 37: .Dd $Mdocdate: November 22 2014 $
1.1 stevesk 38: .Dt SSHD_CONFIG 5
39: .Os
40: .Sh NAME
41: .Nm sshd_config
42: .Nd OpenSSH SSH daemon configuration file
43: .Sh SYNOPSIS
1.71 jmc 44: .Nm /etc/ssh/sshd_config
1.1 stevesk 45: .Sh DESCRIPTION
1.53 jmc 46: .Xr sshd 8
1.1 stevesk 47: reads configuration data from
48: .Pa /etc/ssh/sshd_config
49: (or the file specified with
50: .Fl f
51: on the command line).
52: The file contains keyword-argument pairs, one per line.
53: Lines starting with
54: .Ql #
55: and empty lines are interpreted as comments.
1.56 dtucker 56: Arguments may optionally be enclosed in double quotes
57: .Pq \&"
58: in order to represent arguments containing spaces.
1.1 stevesk 59: .Pp
60: The possible
61: keywords and their meanings are as follows (note that
62: keywords are case-insensitive and arguments are case-sensitive):
63: .Bl -tag -width Ds
1.30 djm 64: .It Cm AcceptEnv
65: Specifies what environment variables sent by the client will be copied into
66: the session's
67: .Xr environ 7 .
68: See
69: .Cm SendEnv
70: in
71: .Xr ssh_config 5
72: for how to configure the client.
1.31 djm 73: Note that environment passing is only supported for protocol 2.
1.30 djm 74: Variables are specified by name, which may contain the wildcard characters
1.51 jmc 75: .Ql *
1.30 djm 76: and
77: .Ql \&? .
1.31 djm 78: Multiple environment variables may be separated by whitespace or spread
1.30 djm 79: across multiple
80: .Cm AcceptEnv
81: directives.
1.31 djm 82: Be warned that some environment variables could be used to bypass restricted
1.30 djm 83: user environments.
84: For this reason, care should be taken in the use of this directive.
85: The default is not to accept any environment variables.
1.37 djm 86: .It Cm AddressFamily
87: Specifies which address family should be used by
1.53 jmc 88: .Xr sshd 8 .
1.37 djm 89: Valid arguments are
90: .Dq any ,
91: .Dq inet
1.52 jmc 92: (use IPv4 only), or
1.37 djm 93: .Dq inet6
94: (use IPv6 only).
95: The default is
96: .Dq any .
1.89 jmc 97: .It Cm AllowAgentForwarding
98: Specifies whether
99: .Xr ssh-agent 1
100: forwarding is permitted.
101: The default is
102: .Dq yes .
103: Note that disabling agent forwarding does not improve security
104: unless users are also denied shell access, as they can always install
105: their own forwarders.
1.1 stevesk 106: .It Cm AllowGroups
107: This keyword can be followed by a list of group name patterns, separated
108: by spaces.
109: If specified, login is allowed only for users whose primary
110: group or supplementary group list matches one of the patterns.
111: Only group names are valid; a numerical group ID is not recognized.
112: By default, login is allowed for all groups.
1.54 jmc 113: The allow/deny directives are processed in the following order:
114: .Cm DenyUsers ,
115: .Cm AllowUsers ,
116: .Cm DenyGroups ,
117: and finally
118: .Cm AllowGroups .
1.49 jmc 119: .Pp
1.161 jmc 120: See PATTERNS in
1.49 jmc 121: .Xr ssh_config 5
122: for more information on patterns.
1.1 stevesk 123: .It Cm AllowTcpForwarding
124: Specifies whether TCP forwarding is permitted.
1.150 djm 125: The available options are
126: .Dq yes
127: or
128: .Dq all
129: to allow TCP forwarding,
130: .Dq no
131: to prevent all TCP forwarding,
132: .Dq local
133: to allow local (from the perspective of
1.151 jmc 134: .Xr ssh 1 )
135: forwarding only or
1.150 djm 136: .Dq remote
137: to allow remote forwarding only.
1.1 stevesk 138: The default is
139: .Dq yes .
140: Note that disabling TCP forwarding does not improve security unless
141: users are also denied shell access, as they can always install their
142: own forwarders.
1.175 millert 143: .It Cm AllowStreamLocalForwarding
144: Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
145: The available options are
146: .Dq yes
147: or
148: .Dq all
149: to allow StreamLocal forwarding,
150: .Dq no
151: to prevent all StreamLocal forwarding,
152: .Dq local
153: to allow local (from the perspective of
154: .Xr ssh 1 )
155: forwarding only or
156: .Dq remote
157: to allow remote forwarding only.
158: The default is
159: .Dq yes .
160: Note that disabling StreamLocal forwarding does not improve security unless
161: users are also denied shell access, as they can always install their
162: own forwarders.
1.1 stevesk 163: .It Cm AllowUsers
164: This keyword can be followed by a list of user name patterns, separated
165: by spaces.
1.14 jmc 166: If specified, login is allowed only for user names that
1.1 stevesk 167: match one of the patterns.
168: Only user names are valid; a numerical user ID is not recognized.
169: By default, login is allowed for all users.
170: If the pattern takes the form USER@HOST then USER and HOST
171: are separately checked, restricting logins to particular
172: users from particular hosts.
1.54 jmc 173: The allow/deny directives are processed in the following order:
174: .Cm DenyUsers ,
175: .Cm AllowUsers ,
176: .Cm DenyGroups ,
177: and finally
178: .Cm AllowGroups .
1.49 jmc 179: .Pp
1.161 jmc 180: See PATTERNS in
1.49 jmc 181: .Xr ssh_config 5
182: for more information on patterns.
1.149 djm 183: .It Cm AuthenticationMethods
184: Specifies the authentication methods that must be successfully completed
185: for a user to be granted access.
186: This option must be followed by one or more comma-separated lists of
187: authentication method names.
188: Successful authentication requires completion of every method in at least
189: one of these lists.
190: .Pp
191: For example, an argument of
192: .Dq publickey,password publickey,keyboard-interactive
193: would require the user to complete public key authentication, followed by
194: either password or keyboard interactive authentication.
195: Only methods that are next in one or more lists are offered at each stage,
196: so for this example, it would not be possible to attempt password or
197: keyboard-interactive authentication before public key.
1.157 markus 198: .Pp
199: For keyboard interactive authentication it is also possible to
200: restrict authentication to a specific device by appending a
201: colon followed by the device identifier
202: .Dq bsdauth ,
203: .Dq pam ,
204: or
205: .Dq skey ,
206: depending on the server configuration.
207: For example,
208: .Dq keyboard-interactive:bsdauth
209: would restrict keyboard interactive authentication to the
210: .Dq bsdauth
211: device.
1.149 djm 212: .Pp
213: This option is only available for SSH protocol 2 and will yield a fatal
214: error if enabled if protocol 1 is also enabled.
215: Note that each authentication method listed should also be explicitly enabled
216: in the configuration.
217: The default is not to require multiple authentication; successful completion
218: of a single authentication method is sufficient.
1.146 djm 219: .It Cm AuthorizedKeysCommand
1.147 jmc 220: Specifies a program to be used to look up the user's public keys.
1.158 djm 221: The program must be owned by root and not writable by group or others.
222: It will be invoked with a single argument of the username
1.146 djm 223: being authenticated, and should produce on standard output zero or
1.161 jmc 224: more lines of authorized_keys output (see AUTHORIZED_KEYS in
1.147 jmc 225: .Xr sshd 8 ) .
1.146 djm 226: If a key supplied by AuthorizedKeysCommand does not successfully authenticate
227: and authorize the user then public key authentication continues using the usual
228: .Cm AuthorizedKeysFile
229: files.
230: By default, no AuthorizedKeysCommand is run.
231: .It Cm AuthorizedKeysCommandUser
232: Specifies the user under whose account the AuthorizedKeysCommand is run.
233: It is recommended to use a dedicated user that has no other role on the host
234: than running authorized keys commands.
1.1 stevesk 235: .It Cm AuthorizedKeysFile
236: Specifies the file that contains the public keys that can be used
237: for user authentication.
1.124 djm 238: The format is described in the
1.161 jmc 239: AUTHORIZED_KEYS FILE FORMAT
1.124 djm 240: section of
241: .Xr sshd 8 .
1.1 stevesk 242: .Cm AuthorizedKeysFile
243: may contain tokens of the form %T which are substituted during connection
1.52 jmc 244: setup.
1.17 jmc 245: The following tokens are defined: %% is replaced by a literal '%',
1.52 jmc 246: %h is replaced by the home directory of the user being authenticated, and
1.1 stevesk 247: %u is replaced by the username of that user.
248: After expansion,
249: .Cm AuthorizedKeysFile
250: is taken to be an absolute path or one relative to the user's home
251: directory.
1.133 jmc 252: Multiple files may be listed, separated by whitespace.
253: The default is
254: .Dq .ssh/authorized_keys .ssh/authorized_keys2 .
1.121 djm 255: .It Cm AuthorizedPrincipalsFile
256: Specifies a file that lists principal names that are accepted for
257: certificate authentication.
258: When using certificates signed by a key listed in
259: .Cm TrustedUserCAKeys ,
260: this file lists names, one of which must appear in the certificate for it
261: to be accepted for authentication.
1.125 jmc 262: Names are listed one per line preceded by key options (as described
1.161 jmc 263: in AUTHORIZED_KEYS FILE FORMAT in
1.125 jmc 264: .Xr sshd 8 ) .
1.124 djm 265: Empty lines and comments starting with
1.121 djm 266: .Ql #
267: are ignored.
268: .Pp
269: .Cm AuthorizedPrincipalsFile
270: may contain tokens of the form %T which are substituted during connection
271: setup.
272: The following tokens are defined: %% is replaced by a literal '%',
273: %h is replaced by the home directory of the user being authenticated, and
274: %u is replaced by the username of that user.
275: After expansion,
276: .Cm AuthorizedPrincipalsFile
277: is taken to be an absolute path or one relative to the user's home
278: directory.
279: .Pp
1.138 djm 280: The default is
281: .Dq none ,
282: i.e. not to use a principals file \(en in this case, the username
1.121 djm 283: of the user must appear in a certificate's principals list for it to be
284: accepted.
285: Note that
286: .Cm AuthorizedPrincipalsFile
287: is only used when authentication proceeds using a CA listed in
288: .Cm TrustedUserCAKeys
289: and is not consulted for certification authorities trusted via
290: .Pa ~/.ssh/authorized_keys ,
291: though the
292: .Cm principals=
293: key option offers a similar facility (see
294: .Xr sshd 8
295: for details).
1.1 stevesk 296: .It Cm Banner
297: The contents of the specified file are sent to the remote user before
298: authentication is allowed.
1.78 djm 299: If the argument is
300: .Dq none
301: then no banner is displayed.
1.1 stevesk 302: This option is only available for protocol version 2.
303: By default, no banner is displayed.
304: .It Cm ChallengeResponseAuthentication
1.50 jmc 305: Specifies whether challenge-response authentication is allowed.
1.1 stevesk 306: All authentication styles from
307: .Xr login.conf 5
308: are supported.
309: The default is
310: .Dq yes .
1.80 djm 311: .It Cm ChrootDirectory
1.113 stevesk 312: Specifies the pathname of a directory to
1.80 djm 313: .Xr chroot 2
314: to after authentication.
1.113 stevesk 315: All components of the pathname must be root-owned directories that are
1.80 djm 316: not writable by any other user or group.
1.106 stevesk 317: After the chroot,
318: .Xr sshd 8
319: changes the working directory to the user's home directory.
1.80 djm 320: .Pp
1.113 stevesk 321: The pathname may contain the following tokens that are expanded at runtime once
1.80 djm 322: the connecting user has been authenticated: %% is replaced by a literal '%',
323: %h is replaced by the home directory of the user being authenticated, and
324: %u is replaced by the username of that user.
325: .Pp
326: The
327: .Cm ChrootDirectory
328: must contain the necessary files and directories to support the
1.103 stevesk 329: user's session.
1.80 djm 330: For an interactive session this requires at least a shell, typically
331: .Xr sh 1 ,
332: and basic
333: .Pa /dev
334: nodes such as
335: .Xr null 4 ,
336: .Xr zero 4 ,
337: .Xr stdin 4 ,
338: .Xr stdout 4 ,
339: .Xr stderr 4 ,
1.180 ! jmc 340: and
1.80 djm 341: .Xr tty 4
342: devices.
343: For file transfer sessions using
1.105 jmc 344: .Dq sftp ,
1.80 djm 345: no additional configuration of the environment is necessary if the
1.105 jmc 346: in-process sftp server is used,
1.176 schwarze 347: though sessions which use logging may require
1.104 stevesk 348: .Pa /dev/log
1.176 schwarze 349: inside the chroot directory on some operating systems (see
1.104 stevesk 350: .Xr sftp-server 8
1.81 jmc 351: for details).
1.80 djm 352: .Pp
353: The default is not to
354: .Xr chroot 2 .
1.1 stevesk 355: .It Cm Ciphers
356: Specifies the ciphers allowed for protocol version 2.
357: Multiple ciphers must be comma-separated.
1.167 djm 358: The supported ciphers are:
359: .Pp
1.173 naddy 360: .Bl -item -compact -offset indent
361: .It
362: 3des-cbc
363: .It
364: aes128-cbc
365: .It
366: aes192-cbc
367: .It
368: aes256-cbc
369: .It
370: aes128-ctr
371: .It
372: aes192-ctr
373: .It
374: aes256-ctr
375: .It
376: aes128-gcm@openssh.com
377: .It
378: aes256-gcm@openssh.com
379: .It
380: arcfour
381: .It
382: arcfour128
383: .It
384: arcfour256
385: .It
386: blowfish-cbc
387: .It
388: cast128-cbc
389: .It
390: chacha20-poly1305@openssh.com
391: .El
1.167 djm 392: .Pp
1.52 jmc 393: The default is:
1.173 naddy 394: .Bd -literal -offset indent
395: aes128-ctr,aes192-ctr,aes256-ctr,
1.153 markus 396: aes128-gcm@openssh.com,aes256-gcm@openssh.com,
1.173 naddy 397: chacha20-poly1305@openssh.com
1.1 stevesk 398: .Ed
1.167 djm 399: .Pp
400: The list of available ciphers may also be obtained using the
401: .Fl Q
402: option of
403: .Xr ssh 1 .
1.1 stevesk 404: .It Cm ClientAliveCountMax
1.48 jmc 405: Sets the number of client alive messages (see below) which may be
1.1 stevesk 406: sent without
1.52 jmc 407: .Xr sshd 8
1.17 jmc 408: receiving any messages back from the client.
409: If this threshold is reached while client alive messages are being sent,
1.52 jmc 410: sshd will disconnect the client, terminating the session.
1.17 jmc 411: It is important to note that the use of client alive messages is very
412: different from
1.27 markus 413: .Cm TCPKeepAlive
1.17 jmc 414: (below).
415: The client alive messages are sent through the encrypted channel
416: and therefore will not be spoofable.
417: The TCP keepalive option enabled by
1.27 markus 418: .Cm TCPKeepAlive
1.17 jmc 419: is spoofable.
420: The client alive mechanism is valuable when the client or
1.1 stevesk 421: server depend on knowing when a connection has become inactive.
422: .Pp
1.17 jmc 423: The default value is 3.
424: If
1.1 stevesk 425: .Cm ClientAliveInterval
1.48 jmc 426: (see below) is set to 15, and
1.1 stevesk 427: .Cm ClientAliveCountMax
1.52 jmc 428: is left at the default, unresponsive SSH clients
1.1 stevesk 429: will be disconnected after approximately 45 seconds.
1.57 markus 430: This option applies to protocol version 2 only.
1.42 djm 431: .It Cm ClientAliveInterval
432: Sets a timeout interval in seconds after which if no data has been received
433: from the client,
1.52 jmc 434: .Xr sshd 8
1.42 djm 435: will send a message through the encrypted
436: channel to request a response from the client.
437: The default
438: is 0, indicating that these messages will not be sent to the client.
439: This option applies to protocol version 2 only.
1.3 markus 440: .It Cm Compression
1.44 markus 441: Specifies whether compression is allowed, or delayed until
442: the user has authenticated successfully.
1.3 markus 443: The argument must be
1.44 markus 444: .Dq yes ,
445: .Dq delayed ,
1.3 markus 446: or
447: .Dq no .
448: The default is
1.44 markus 449: .Dq delayed .
1.1 stevesk 450: .It Cm DenyGroups
451: This keyword can be followed by a list of group name patterns, separated
452: by spaces.
453: Login is disallowed for users whose primary group or supplementary
454: group list matches one of the patterns.
455: Only group names are valid; a numerical group ID is not recognized.
456: By default, login is allowed for all groups.
1.54 jmc 457: The allow/deny directives are processed in the following order:
458: .Cm DenyUsers ,
459: .Cm AllowUsers ,
460: .Cm DenyGroups ,
461: and finally
462: .Cm AllowGroups .
1.49 jmc 463: .Pp
1.161 jmc 464: See PATTERNS in
1.49 jmc 465: .Xr ssh_config 5
466: for more information on patterns.
1.1 stevesk 467: .It Cm DenyUsers
468: This keyword can be followed by a list of user name patterns, separated
469: by spaces.
470: Login is disallowed for user names that match one of the patterns.
471: Only user names are valid; a numerical user ID is not recognized.
472: By default, login is allowed for all users.
473: If the pattern takes the form USER@HOST then USER and HOST
474: are separately checked, restricting logins to particular
475: users from particular hosts.
1.54 jmc 476: The allow/deny directives are processed in the following order:
477: .Cm DenyUsers ,
478: .Cm AllowUsers ,
479: .Cm DenyGroups ,
480: and finally
481: .Cm AllowGroups .
1.49 jmc 482: .Pp
1.161 jmc 483: See PATTERNS in
1.49 jmc 484: .Xr ssh_config 5
485: for more information on patterns.
1.67 dtucker 486: .It Cm ForceCommand
487: Forces the execution of the command specified by
488: .Cm ForceCommand ,
1.84 djm 489: ignoring any command supplied by the client and
490: .Pa ~/.ssh/rc
491: if present.
1.67 dtucker 492: The command is invoked by using the user's login shell with the -c option.
493: This applies to shell, command, or subsystem execution.
494: It is most useful inside a
495: .Cm Match
496: block.
497: The command originally supplied by the client is available in the
498: .Ev SSH_ORIGINAL_COMMAND
499: environment variable.
1.82 djm 500: Specifying a command of
501: .Dq internal-sftp
502: will force the use of an in-process sftp server that requires no support
503: files when used with
504: .Cm ChrootDirectory .
1.1 stevesk 505: .It Cm GatewayPorts
506: Specifies whether remote hosts are allowed to connect to ports
507: forwarded for the client.
508: By default,
1.52 jmc 509: .Xr sshd 8
1.15 jmc 510: binds remote port forwardings to the loopback address.
511: This prevents other remote hosts from connecting to forwarded ports.
1.1 stevesk 512: .Cm GatewayPorts
1.52 jmc 513: can be used to specify that sshd
1.39 djm 514: should allow remote port forwardings to bind to non-loopback addresses, thus
515: allowing other hosts to connect.
516: The argument may be
517: .Dq no
518: to force remote port forwardings to be available to the local host only,
1.1 stevesk 519: .Dq yes
1.39 djm 520: to force remote port forwardings to bind to the wildcard address, or
521: .Dq clientspecified
522: to allow the client to select the address to which the forwarding is bound.
1.1 stevesk 523: The default is
524: .Dq no .
1.23 markus 525: .It Cm GSSAPIAuthentication
1.25 markus 526: Specifies whether user authentication based on GSSAPI is allowed.
1.26 djm 527: The default is
1.23 markus 528: .Dq no .
529: Note that this option applies to protocol version 2 only.
530: .It Cm GSSAPICleanupCredentials
531: Specifies whether to automatically destroy the user's credentials cache
532: on logout.
533: The default is
534: .Dq yes .
535: Note that this option applies to protocol version 2 only.
1.1 stevesk 536: .It Cm HostbasedAuthentication
537: Specifies whether rhosts or /etc/hosts.equiv authentication together
538: with successful public key client host authentication is allowed
1.50 jmc 539: (host-based authentication).
1.1 stevesk 540: This option is similar to
541: .Cm RhostsRSAAuthentication
542: and applies to protocol version 2 only.
1.70 dtucker 543: The default is
544: .Dq no .
545: .It Cm HostbasedUsesNameFromPacketOnly
546: Specifies whether or not the server will attempt to perform a reverse
547: name lookup when matching the name in the
548: .Pa ~/.shosts ,
549: .Pa ~/.rhosts ,
550: and
551: .Pa /etc/hosts.equiv
552: files during
553: .Cm HostbasedAuthentication .
554: A setting of
555: .Dq yes
556: means that
557: .Xr sshd 8
558: uses the name supplied by the client rather than
559: attempting to resolve the name from the TCP connection itself.
1.1 stevesk 560: The default is
561: .Dq no .
1.117 djm 562: .It Cm HostCertificate
563: Specifies a file containing a public host certificate.
564: The certificate's public key must match a private host key already specified
565: by
566: .Cm HostKey .
567: The default behaviour of
568: .Xr sshd 8
569: is not to load any certificates.
1.1 stevesk 570: .It Cm HostKey
571: Specifies a file containing a private host key
572: used by SSH.
573: The default is
574: .Pa /etc/ssh/ssh_host_key
575: for protocol version 1, and
1.126 djm 576: .Pa /etc/ssh/ssh_host_dsa_key ,
1.169 naddy 577: .Pa /etc/ssh/ssh_host_ecdsa_key ,
578: .Pa /etc/ssh/ssh_host_ed25519_key
1.126 djm 579: and
1.1 stevesk 580: .Pa /etc/ssh/ssh_host_rsa_key
581: for protocol version 2.
582: Note that
1.52 jmc 583: .Xr sshd 8
1.1 stevesk 584: will refuse to use a file if it is group/world-accessible.
585: It is possible to have multiple host key files.
586: .Dq rsa1
587: keys are used for version 1 and
1.126 djm 588: .Dq dsa ,
1.169 naddy 589: .Dq ecdsa ,
590: .Dq ed25519
1.1 stevesk 591: or
592: .Dq rsa
593: are used for version 2 of the SSH protocol.
1.162 markus 594: It is also possible to specify public host key files instead.
595: In this case operations on the private key will be delegated
596: to an
597: .Xr ssh-agent 1 .
598: .It Cm HostKeyAgent
599: Identifies the UNIX-domain socket used to communicate
600: with an agent that has access to the private host keys.
601: If
602: .Dq SSH_AUTH_SOCK
603: is specified, the location of the socket will be read from the
604: .Ev SSH_AUTH_SOCK
605: environment variable.
1.1 stevesk 606: .It Cm IgnoreRhosts
607: Specifies that
608: .Pa .rhosts
609: and
610: .Pa .shosts
611: files will not be used in
612: .Cm RhostsRSAAuthentication
613: or
614: .Cm HostbasedAuthentication .
615: .Pp
616: .Pa /etc/hosts.equiv
617: and
618: .Pa /etc/shosts.equiv
619: are still used.
620: The default is
621: .Dq yes .
622: .It Cm IgnoreUserKnownHosts
623: Specifies whether
1.52 jmc 624: .Xr sshd 8
1.1 stevesk 625: should ignore the user's
1.41 djm 626: .Pa ~/.ssh/known_hosts
1.1 stevesk 627: during
628: .Cm RhostsRSAAuthentication
629: or
630: .Cm HostbasedAuthentication .
631: The default is
632: .Dq no .
1.129 djm 633: .It Cm IPQoS
634: Specifies the IPv4 type-of-service or DSCP class for the connection.
635: Accepted values are
636: .Dq af11 ,
637: .Dq af12 ,
638: .Dq af13 ,
1.136 djm 639: .Dq af21 ,
1.129 djm 640: .Dq af22 ,
641: .Dq af23 ,
642: .Dq af31 ,
643: .Dq af32 ,
644: .Dq af33 ,
645: .Dq af41 ,
646: .Dq af42 ,
647: .Dq af43 ,
648: .Dq cs0 ,
649: .Dq cs1 ,
650: .Dq cs2 ,
651: .Dq cs3 ,
652: .Dq cs4 ,
653: .Dq cs5 ,
654: .Dq cs6 ,
655: .Dq cs7 ,
656: .Dq ef ,
657: .Dq lowdelay ,
658: .Dq throughput ,
659: .Dq reliability ,
660: or a numeric value.
1.131 djm 661: This option may take one or two arguments, separated by whitespace.
1.129 djm 662: If one argument is specified, it is used as the packet class unconditionally.
663: If two values are specified, the first is automatically selected for
664: interactive sessions and the second for non-interactive sessions.
665: The default is
666: .Dq lowdelay
667: for interactive sessions and
668: .Dq throughput
669: for non-interactive sessions.
1.171 jmc 670: .It Cm KbdInteractiveAuthentication
671: Specifies whether to allow keyboard-interactive authentication.
672: The argument to this keyword must be
673: .Dq yes
674: or
675: .Dq no .
676: The default is to use whatever value
677: .Cm ChallengeResponseAuthentication
678: is set to
679: (by default
680: .Dq yes ) .
1.1 stevesk 681: .It Cm KerberosAuthentication
1.24 markus 682: Specifies whether the password provided by the user for
1.1 stevesk 683: .Cm PasswordAuthentication
1.24 markus 684: will be validated through the Kerberos KDC.
1.1 stevesk 685: To use this option, the server needs a
686: Kerberos servtab which allows the verification of the KDC's identity.
1.52 jmc 687: The default is
1.29 dtucker 688: .Dq no .
689: .It Cm KerberosGetAFSToken
1.45 djm 690: If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
1.29 dtucker 691: an AFS token before accessing the user's home directory.
1.52 jmc 692: The default is
1.1 stevesk 693: .Dq no .
694: .It Cm KerberosOrLocalPasswd
1.52 jmc 695: If password authentication through Kerberos fails then
1.1 stevesk 696: the password will be validated via any additional local mechanism
697: such as
698: .Pa /etc/passwd .
1.52 jmc 699: The default is
1.1 stevesk 700: .Dq yes .
701: .It Cm KerberosTicketCleanup
702: Specifies whether to automatically destroy the user's ticket cache
703: file on logout.
1.52 jmc 704: The default is
1.1 stevesk 705: .Dq yes .
1.127 djm 706: .It Cm KexAlgorithms
707: Specifies the available KEX (Key Exchange) algorithms.
708: Multiple algorithms must be comma-separated.
1.173 naddy 709: The supported algorithms are:
710: .Pp
711: .Bl -item -compact -offset indent
712: .It
713: curve25519-sha256@libssh.org
714: .It
715: diffie-hellman-group1-sha1
716: .It
717: diffie-hellman-group14-sha1
718: .It
719: diffie-hellman-group-exchange-sha1
720: .It
721: diffie-hellman-group-exchange-sha256
722: .It
723: ecdh-sha2-nistp256
724: .It
725: ecdh-sha2-nistp384
726: .It
727: ecdh-sha2-nistp521
728: .El
729: .Pp
730: The default is:
1.170 dtucker 731: .Bd -literal -offset indent
732: curve25519-sha256@libssh.org,
733: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
734: diffie-hellman-group-exchange-sha256,
1.173 naddy 735: diffie-hellman-group14-sha1
1.170 dtucker 736: .Ed
1.1 stevesk 737: .It Cm KeyRegenerationInterval
738: In protocol version 1, the ephemeral server key is automatically regenerated
739: after this many seconds (if it has been used).
740: The purpose of regeneration is to prevent
741: decrypting captured sessions by later breaking into the machine and
742: stealing the keys.
743: The key is never stored anywhere.
744: If the value is 0, the key is never regenerated.
745: The default is 3600 (seconds).
746: .It Cm ListenAddress
747: Specifies the local addresses
1.52 jmc 748: .Xr sshd 8
1.1 stevesk 749: should listen on.
750: The following forms may be used:
751: .Pp
752: .Bl -item -offset indent -compact
753: .It
754: .Cm ListenAddress
755: .Sm off
1.180 ! jmc 756: .Ar host | Ar IPv4_addr | Ar IPv6_addr
1.1 stevesk 757: .Sm on
758: .It
759: .Cm ListenAddress
760: .Sm off
1.180 ! jmc 761: .Ar host | Ar IPv4_addr : Ar port
1.1 stevesk 762: .Sm on
763: .It
764: .Cm ListenAddress
765: .Sm off
766: .Oo
1.180 ! jmc 767: .Ar host | Ar IPv6_addr Oc : Ar port
1.1 stevesk 768: .Sm on
769: .El
770: .Pp
771: If
772: .Ar port
773: is not specified,
1.52 jmc 774: sshd will listen on the address and all prior
1.1 stevesk 775: .Cm Port
1.17 jmc 776: options specified.
777: The default is to listen on all local addresses.
1.15 jmc 778: Multiple
1.1 stevesk 779: .Cm ListenAddress
1.17 jmc 780: options are permitted.
781: Additionally, any
1.1 stevesk 782: .Cm Port
1.52 jmc 783: options must precede this option for non-port qualified addresses.
1.1 stevesk 784: .It Cm LoginGraceTime
785: The server disconnects after this time if the user has not
786: successfully logged in.
787: If the value is 0, there is no time limit.
1.12 stevesk 788: The default is 120 seconds.
1.1 stevesk 789: .It Cm LogLevel
790: Gives the verbosity level that is used when logging messages from
1.53 jmc 791: .Xr sshd 8 .
1.1 stevesk 792: The possible values are:
1.52 jmc 793: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1.15 jmc 794: The default is INFO.
795: DEBUG and DEBUG1 are equivalent.
796: DEBUG2 and DEBUG3 each specify higher levels of debugging output.
797: Logging with a DEBUG level violates the privacy of users and is not recommended.
1.1 stevesk 798: .It Cm MACs
799: Specifies the available MAC (message authentication code) algorithms.
800: The MAC algorithm is used in protocol version 2
801: for data integrity protection.
802: Multiple algorithms must be comma-separated.
1.152 markus 803: The algorithms that contain
804: .Dq -etm
805: calculate the MAC after encryption (encrypt-then-mac).
806: These are considered safer and their use recommended.
1.173 naddy 807: The supported MACs are:
808: .Pp
809: .Bl -item -compact -offset indent
810: .It
811: hmac-md5
812: .It
813: hmac-md5-96
814: .It
815: hmac-ripemd160
816: .It
817: hmac-sha1
818: .It
819: hmac-sha1-96
820: .It
821: hmac-sha2-256
822: .It
823: hmac-sha2-512
824: .It
825: umac-64@openssh.com
826: .It
827: umac-128@openssh.com
828: .It
829: hmac-md5-etm@openssh.com
830: .It
831: hmac-md5-96-etm@openssh.com
832: .It
833: hmac-ripemd160-etm@openssh.com
834: .It
835: hmac-sha1-etm@openssh.com
836: .It
837: hmac-sha1-96-etm@openssh.com
838: .It
839: hmac-sha2-256-etm@openssh.com
840: .It
841: hmac-sha2-512-etm@openssh.com
842: .It
843: umac-64-etm@openssh.com
844: .It
845: umac-128-etm@openssh.com
846: .El
847: .Pp
1.52 jmc 848: The default is:
1.77 jmc 849: .Bd -literal -offset indent
1.152 markus 850: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
851: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
1.173 naddy 852: umac-64@openssh.com,umac-128@openssh.com,
853: hmac-sha2-256,hmac-sha2-512
1.77 jmc 854: .Ed
1.60 dtucker 855: .It Cm Match
1.61 jmc 856: Introduces a conditional block.
1.65 dtucker 857: If all of the criteria on the
1.60 dtucker 858: .Cm Match
1.65 dtucker 859: line are satisfied, the keywords on the following lines override those
860: set in the global section of the config file, until either another
1.60 dtucker 861: .Cm Match
1.65 dtucker 862: line or the end of the file.
1.172 djm 863: If a keyword appears in multiple
864: .Cm Match
1.177 sobrado 865: blocks that are satisfied, only the first instance of the keyword is
1.172 djm 866: applied.
1.91 djm 867: .Pp
1.61 jmc 868: The arguments to
1.60 dtucker 869: .Cm Match
1.163 dtucker 870: are one or more criteria-pattern pairs or the single token
871: .Cm All
872: which matches all criteria.
1.60 dtucker 873: The available criteria are
874: .Cm User ,
1.69 dtucker 875: .Cm Group ,
1.60 dtucker 876: .Cm Host ,
1.139 dtucker 877: .Cm LocalAddress ,
878: .Cm LocalPort ,
1.60 dtucker 879: and
880: .Cm Address .
1.91 djm 881: The match patterns may consist of single entries or comma-separated
882: lists and may use the wildcard and negation operators described in the
1.161 jmc 883: PATTERNS section of
1.92 djm 884: .Xr ssh_config 5 .
1.91 djm 885: .Pp
886: The patterns in an
887: .Cm Address
888: criteria may additionally contain addresses to match in CIDR
1.93 jmc 889: address/masklen format, e.g.\&
1.91 djm 890: .Dq 192.0.2.0/24
891: or
892: .Dq 3ffe:ffff::/32 .
893: Note that the mask length provided must be consistent with the address -
894: it is an error to specify a mask length that is too long for the address
1.93 jmc 895: or one with bits set in this host portion of the address.
896: For example,
1.91 djm 897: .Dq 192.0.2.0/33
898: and
1.93 jmc 899: .Dq 192.0.2.0/8
1.91 djm 900: respectively.
901: .Pp
1.60 dtucker 902: Only a subset of keywords may be used on the lines following a
903: .Cm Match
904: keyword.
905: Available keywords are
1.142 jmc 906: .Cm AcceptEnv ,
1.99 okan 907: .Cm AllowAgentForwarding ,
1.142 jmc 908: .Cm AllowGroups ,
1.62 dtucker 909: .Cm AllowTcpForwarding ,
1.141 markus 910: .Cm AllowUsers ,
1.149 djm 911: .Cm AuthenticationMethods ,
1.146 djm 912: .Cm AuthorizedKeysCommand ,
913: .Cm AuthorizedKeysCommandUser ,
1.147 jmc 914: .Cm AuthorizedKeysFile ,
1.123 djm 915: .Cm AuthorizedPrincipalsFile ,
1.72 dtucker 916: .Cm Banner ,
1.85 djm 917: .Cm ChrootDirectory ,
1.141 markus 918: .Cm DenyGroups ,
919: .Cm DenyUsers ,
1.67 dtucker 920: .Cm ForceCommand ,
1.142 jmc 921: .Cm GatewayPorts ,
1.141 markus 922: .Cm GSSAPIAuthentication ,
1.87 djm 923: .Cm HostbasedAuthentication ,
1.123 djm 924: .Cm HostbasedUsesNameFromPacketOnly ,
1.74 jmc 925: .Cm KbdInteractiveAuthentication ,
1.72 dtucker 926: .Cm KerberosAuthentication ,
1.95 dtucker 927: .Cm MaxAuthTries ,
1.94 dtucker 928: .Cm MaxSessions ,
1.72 dtucker 929: .Cm PasswordAuthentication ,
1.97 djm 930: .Cm PermitEmptyPasswords ,
1.66 dtucker 931: .Cm PermitOpen ,
1.79 dtucker 932: .Cm PermitRootLogin ,
1.164 djm 933: .Cm PermitTTY ,
1.123 djm 934: .Cm PermitTunnel ,
1.174 djm 935: .Cm PermitUserRC ,
1.107 dtucker 936: .Cm PubkeyAuthentication ,
1.159 dtucker 937: .Cm RekeyLimit ,
1.142 jmc 938: .Cm RhostsRSAAuthentication ,
1.141 markus 939: .Cm RSAAuthentication ,
1.66 dtucker 940: .Cm X11DisplayOffset ,
1.101 djm 941: .Cm X11Forwarding
1.60 dtucker 942: and
1.102 djm 943: .Cm X11UseLocalHost .
1.33 dtucker 944: .It Cm MaxAuthTries
945: Specifies the maximum number of authentication attempts permitted per
1.35 jmc 946: connection.
947: Once the number of failures reaches half this value,
948: additional failures are logged.
949: The default is 6.
1.90 djm 950: .It Cm MaxSessions
951: Specifies the maximum number of open sessions permitted per network connection.
952: The default is 10.
1.1 stevesk 953: .It Cm MaxStartups
954: Specifies the maximum number of concurrent unauthenticated connections to the
1.52 jmc 955: SSH daemon.
1.1 stevesk 956: Additional connections will be dropped until authentication succeeds or the
957: .Cm LoginGraceTime
958: expires for a connection.
1.156 dtucker 959: The default is 10:30:100.
1.1 stevesk 960: .Pp
961: Alternatively, random early drop can be enabled by specifying
962: the three colon separated values
963: .Dq start:rate:full
1.51 jmc 964: (e.g. "10:30:60").
1.53 jmc 965: .Xr sshd 8
1.1 stevesk 966: will refuse connection attempts with a probability of
967: .Dq rate/100
968: (30%)
969: if there are currently
970: .Dq start
971: (10)
972: unauthenticated connections.
973: The probability increases linearly and all connection attempts
974: are refused if the number of unauthenticated connections reaches
975: .Dq full
976: (60).
977: .It Cm PasswordAuthentication
978: Specifies whether password authentication is allowed.
979: The default is
980: .Dq yes .
981: .It Cm PermitEmptyPasswords
982: When password authentication is allowed, it specifies whether the
983: server allows login to accounts with empty password strings.
984: The default is
985: .Dq no .
1.62 dtucker 986: .It Cm PermitOpen
987: Specifies the destinations to which TCP port forwarding is permitted.
988: The forwarding specification must be one of the following forms:
989: .Pp
990: .Bl -item -offset indent -compact
991: .It
992: .Cm PermitOpen
993: .Sm off
994: .Ar host : port
995: .Sm on
996: .It
997: .Cm PermitOpen
998: .Sm off
999: .Ar IPv4_addr : port
1000: .Sm on
1001: .It
1002: .Cm PermitOpen
1003: .Sm off
1004: .Ar \&[ IPv6_addr \&] : port
1005: .Sm on
1006: .El
1007: .Pp
1.68 dtucker 1008: Multiple forwards may be specified by separating them with whitespace.
1.62 dtucker 1009: An argument of
1010: .Dq any
1011: can be used to remove all restrictions and permit any forwarding requests.
1.140 dtucker 1012: An argument of
1013: .Dq none
1014: can be used to prohibit all forwarding requests.
1.63 jmc 1015: By default all port forwarding requests are permitted.
1.1 stevesk 1016: .It Cm PermitRootLogin
1.38 jmc 1017: Specifies whether root can log in using
1.1 stevesk 1018: .Xr ssh 1 .
1019: The argument must be
1020: .Dq yes ,
1021: .Dq without-password ,
1.52 jmc 1022: .Dq forced-commands-only ,
1.1 stevesk 1023: or
1024: .Dq no .
1025: The default is
1026: .Dq yes .
1027: .Pp
1028: If this option is set to
1.52 jmc 1029: .Dq without-password ,
1.1 stevesk 1030: password authentication is disabled for root.
1031: .Pp
1032: If this option is set to
1.52 jmc 1033: .Dq forced-commands-only ,
1.1 stevesk 1034: root login with public key authentication will be allowed,
1035: but only if the
1036: .Ar command
1037: option has been specified
1038: (which may be useful for taking remote backups even if root login is
1.17 jmc 1039: normally not allowed).
1040: All other authentication methods are disabled for root.
1.1 stevesk 1041: .Pp
1042: If this option is set to
1.52 jmc 1043: .Dq no ,
1.38 jmc 1044: root is not allowed to log in.
1.46 reyk 1045: .It Cm PermitTunnel
1046: Specifies whether
1047: .Xr tun 4
1048: device forwarding is allowed.
1.47 reyk 1049: The argument must be
1050: .Dq yes ,
1.58 stevesk 1051: .Dq point-to-point
1052: (layer 3),
1053: .Dq ethernet
1054: (layer 2), or
1.47 reyk 1055: .Dq no .
1.58 stevesk 1056: Specifying
1057: .Dq yes
1058: permits both
1059: .Dq point-to-point
1060: and
1061: .Dq ethernet .
1.46 reyk 1062: The default is
1063: .Dq no .
1.178 djm 1064: .Pp
1065: Independent of this setting, the permissions of the selected
1066: .Xr tun 4
1067: device must allow access to the user.
1.164 djm 1068: .It Cm PermitTTY
1069: Specifies whether
1.165 jmc 1070: .Xr pty 4
1.164 djm 1071: allocation is permitted.
1072: The default is
1073: .Dq yes .
1.6 markus 1074: .It Cm PermitUserEnvironment
1075: Specifies whether
1076: .Pa ~/.ssh/environment
1.9 stevesk 1077: and
1.6 markus 1078: .Cm environment=
1079: options in
1080: .Pa ~/.ssh/authorized_keys
1.9 stevesk 1081: are processed by
1.52 jmc 1082: .Xr sshd 8 .
1.6 markus 1083: The default is
1084: .Dq no .
1.9 stevesk 1085: Enabling environment processing may enable users to bypass access
1086: restrictions in some configurations using mechanisms such as
1087: .Ev LD_PRELOAD .
1.174 djm 1088: .It Cm PermitUserRC
1089: Specifies whether any
1090: .Pa ~/.ssh/rc
1091: file is executed.
1092: The default is
1093: .Dq yes .
1.1 stevesk 1094: .It Cm PidFile
1.4 stevesk 1095: Specifies the file that contains the process ID of the
1.53 jmc 1096: SSH daemon.
1.1 stevesk 1097: The default is
1098: .Pa /var/run/sshd.pid .
1099: .It Cm Port
1100: Specifies the port number that
1.52 jmc 1101: .Xr sshd 8
1.1 stevesk 1102: listens on.
1103: The default is 22.
1104: Multiple options of this type are permitted.
1105: See also
1106: .Cm ListenAddress .
1107: .It Cm PrintLastLog
1108: Specifies whether
1.52 jmc 1109: .Xr sshd 8
1.36 jaredy 1110: should print the date and time of the last user login when a user logs
1111: in interactively.
1.1 stevesk 1112: The default is
1113: .Dq yes .
1114: .It Cm PrintMotd
1115: Specifies whether
1.52 jmc 1116: .Xr sshd 8
1.1 stevesk 1117: should print
1118: .Pa /etc/motd
1119: when a user logs in interactively.
1120: (On some systems it is also printed by the shell,
1121: .Pa /etc/profile ,
1122: or equivalent.)
1123: The default is
1124: .Dq yes .
1125: .It Cm Protocol
1126: Specifies the protocol versions
1.52 jmc 1127: .Xr sshd 8
1.5 stevesk 1128: supports.
1.1 stevesk 1129: The possible values are
1.52 jmc 1130: .Sq 1
1.1 stevesk 1131: and
1.52 jmc 1132: .Sq 2 .
1.1 stevesk 1133: Multiple versions must be comma-separated.
1134: The default is
1.109 jmc 1135: .Sq 2 .
1.5 stevesk 1136: Note that the order of the protocol list does not indicate preference,
1137: because the client selects among multiple protocol versions offered
1138: by the server.
1139: Specifying
1140: .Dq 2,1
1141: is identical to
1142: .Dq 1,2 .
1.1 stevesk 1143: .It Cm PubkeyAuthentication
1144: Specifies whether public key authentication is allowed.
1145: The default is
1146: .Dq yes .
1147: Note that this option applies to protocol version 2 only.
1.159 dtucker 1148: .It Cm RekeyLimit
1149: Specifies the maximum amount of data that may be transmitted before the
1150: session key is renegotiated, optionally followed a maximum amount of
1151: time that may pass before the session key is renegotiated.
1152: The first argument is specified in bytes and may have a suffix of
1153: .Sq K ,
1154: .Sq M ,
1155: or
1156: .Sq G
1157: to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1158: The default is between
1159: .Sq 1G
1160: and
1161: .Sq 4G ,
1162: depending on the cipher.
1163: The optional second value is specified in seconds and may use any of the
1164: units documented in the
1165: .Sx TIME FORMATS
1.160 jmc 1166: section.
1.159 dtucker 1167: The default value for
1168: .Cm RekeyLimit
1169: is
1170: .Dq default none ,
1171: which means that rekeying is performed after the cipher's default amount
1172: of data has been sent or received and no time based rekeying is done.
1173: This option applies to protocol version 2 only.
1.118 djm 1174: .It Cm RevokedKeys
1.154 djm 1175: Specifies revoked public keys.
1.118 djm 1176: Keys listed in this file will be refused for public key authentication.
1177: Note that if this file is not readable, then public key authentication will
1178: be refused for all users.
1.154 djm 1179: Keys may be specified as a text file, listing one public key per line, or as
1180: an OpenSSH Key Revocation List (KRL) as generated by
1.155 jmc 1181: .Xr ssh-keygen 1 .
1.161 jmc 1182: For more information on KRLs, see the KEY REVOCATION LISTS section in
1.154 djm 1183: .Xr ssh-keygen 1 .
1.1 stevesk 1184: .It Cm RhostsRSAAuthentication
1185: Specifies whether rhosts or /etc/hosts.equiv authentication together
1186: with successful RSA host authentication is allowed.
1187: The default is
1188: .Dq no .
1189: This option applies to protocol version 1 only.
1190: .It Cm RSAAuthentication
1191: Specifies whether pure RSA authentication is allowed.
1192: The default is
1193: .Dq yes .
1194: This option applies to protocol version 1 only.
1195: .It Cm ServerKeyBits
1196: Defines the number of bits in the ephemeral protocol version 1 server key.
1.96 djm 1197: The minimum value is 512, and the default is 1024.
1.175 millert 1198: .It Cm StreamLocalBindMask
1199: Sets the octal file creation mode mask
1200: .Pq umask
1201: used when creating a Unix-domain socket file for local or remote
1202: port forwarding.
1203: This option is only used for port forwarding to a Unix-domain socket file.
1204: .Pp
1205: The default value is 0177, which creates a Unix-domain socket file that is
1206: readable and writable only by the owner.
1207: Note that not all operating systems honor the file mode on Unix-domain
1208: socket files.
1209: .It Cm StreamLocalBindUnlink
1210: Specifies whether to remove an existing Unix-domain socket file for local
1211: or remote port forwarding before creating a new one.
1212: If the socket file already exists and
1213: .Cm StreamLocalBindUnlink
1214: is not enabled,
1215: .Nm sshd
1216: will be unable to forward the port to the Unix-domain socket file.
1217: This option is only used for port forwarding to a Unix-domain socket file.
1218: .Pp
1219: The argument must be
1220: .Dq yes
1221: or
1222: .Dq no .
1223: The default is
1224: .Dq no .
1.1 stevesk 1225: .It Cm StrictModes
1226: Specifies whether
1.52 jmc 1227: .Xr sshd 8
1.1 stevesk 1228: should check file modes and ownership of the
1229: user's files and home directory before accepting login.
1230: This is normally desirable because novices sometimes accidentally leave their
1231: directory or files world-writable.
1232: The default is
1233: .Dq yes .
1.112 djm 1234: Note that this does not apply to
1235: .Cm ChrootDirectory ,
1236: whose permissions and ownership are checked unconditionally.
1.1 stevesk 1237: .It Cm Subsystem
1.51 jmc 1238: Configures an external subsystem (e.g. file transfer daemon).
1.59 djm 1239: Arguments should be a subsystem name and a command (with optional arguments)
1240: to execute upon subsystem request.
1.80 djm 1241: .Pp
1.1 stevesk 1242: The command
1243: .Xr sftp-server 8
1244: implements the
1245: .Dq sftp
1246: file transfer subsystem.
1.80 djm 1247: .Pp
1248: Alternately the name
1249: .Dq internal-sftp
1250: implements an in-process
1251: .Dq sftp
1252: server.
1253: This may simplify configurations using
1254: .Cm ChrootDirectory
1255: to force a different filesystem root on clients.
1256: .Pp
1.1 stevesk 1257: By default no subsystems are defined.
1258: Note that this option applies to protocol version 2 only.
1259: .It Cm SyslogFacility
1260: Gives the facility code that is used when logging messages from
1.53 jmc 1261: .Xr sshd 8 .
1.1 stevesk 1262: The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1263: LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1264: The default is AUTH.
1.27 markus 1265: .It Cm TCPKeepAlive
1266: Specifies whether the system should send TCP keepalive messages to the
1267: other side.
1268: If they are sent, death of the connection or crash of one
1269: of the machines will be properly noticed.
1270: However, this means that
1271: connections will die if the route is down temporarily, and some people
1272: find it annoying.
1273: On the other hand, if TCP keepalives are not sent,
1274: sessions may hang indefinitely on the server, leaving
1275: .Dq ghost
1276: users and consuming server resources.
1277: .Pp
1278: The default is
1279: .Dq yes
1280: (to send TCP keepalive messages), and the server will notice
1281: if the network goes down or the client host crashes.
1282: This avoids infinitely hanging sessions.
1283: .Pp
1284: To disable TCP keepalive messages, the value should be set to
1285: .Dq no .
1.118 djm 1286: .It Cm TrustedUserCAKeys
1287: Specifies a file containing public keys of certificate authorities that are
1.120 djm 1288: trusted to sign user certificates for authentication.
1.119 jmc 1289: Keys are listed one per line; empty lines and comments starting with
1.118 djm 1290: .Ql #
1291: are allowed.
1292: If a certificate is presented for authentication and has its signing CA key
1293: listed in this file, then it may be used for authentication for any user
1294: listed in the certificate's principals list.
1295: Note that certificates that lack a list of principals will not be permitted
1296: for authentication using
1297: .Cm TrustedUserCAKeys .
1.161 jmc 1298: For more details on certificates, see the CERTIFICATES section in
1.118 djm 1299: .Xr ssh-keygen 1 .
1.18 markus 1300: .It Cm UseDNS
1301: Specifies whether
1.52 jmc 1302: .Xr sshd 8
1.40 jmc 1303: should look up the remote host name and check that
1.18 markus 1304: the resolved host name for the remote IP address maps back to the
1305: very same IP address.
1306: The default is
1307: .Dq yes .
1.1 stevesk 1308: .It Cm UseLogin
1309: Specifies whether
1310: .Xr login 1
1311: is used for interactive login sessions.
1312: The default is
1313: .Dq no .
1314: Note that
1315: .Xr login 1
1316: is never used for remote command execution.
1317: Note also, that if this is enabled,
1318: .Cm X11Forwarding
1319: will be disabled because
1320: .Xr login 1
1321: does not know how to handle
1322: .Xr xauth 1
1.15 jmc 1323: cookies.
1324: If
1.1 stevesk 1325: .Cm UsePrivilegeSeparation
1326: is specified, it will be disabled after authentication.
1327: .It Cm UsePrivilegeSeparation
1328: Specifies whether
1.52 jmc 1329: .Xr sshd 8
1.2 stevesk 1330: separates privileges by creating an unprivileged child process
1.15 jmc 1331: to deal with incoming network traffic.
1332: After successful authentication, another process will be created that has
1333: the privilege of the authenticated user.
1334: The goal of privilege separation is to prevent privilege
1.1 stevesk 1335: escalation by containing any corruption within the unprivileged processes.
1336: The default is
1337: .Dq yes .
1.134 djm 1338: If
1339: .Cm UsePrivilegeSeparation
1340: is set to
1341: .Dq sandbox
1342: then the pre-authentication unprivileged process is subject to additional
1343: restrictions.
1.137 djm 1344: .It Cm VersionAddendum
1345: Optionally specifies additional text to append to the SSH protocol banner
1346: sent by the server upon connection.
1347: The default is
1348: .Dq none .
1.1 stevesk 1349: .It Cm X11DisplayOffset
1350: Specifies the first display number available for
1.52 jmc 1351: .Xr sshd 8 Ns 's
1.1 stevesk 1352: X11 forwarding.
1.52 jmc 1353: This prevents sshd from interfering with real X11 servers.
1.1 stevesk 1354: The default is 10.
1355: .It Cm X11Forwarding
1356: Specifies whether X11 forwarding is permitted.
1.13 stevesk 1357: The argument must be
1358: .Dq yes
1359: or
1360: .Dq no .
1.1 stevesk 1361: The default is
1362: .Dq no .
1.13 stevesk 1363: .Pp
1364: When X11 forwarding is enabled, there may be additional exposure to
1365: the server and to client displays if the
1.52 jmc 1366: .Xr sshd 8
1.13 stevesk 1367: proxy display is configured to listen on the wildcard address (see
1368: .Cm X11UseLocalhost
1.52 jmc 1369: below), though this is not the default.
1.13 stevesk 1370: Additionally, the authentication spoofing and authentication data
1371: verification and substitution occur on the client side.
1372: The security risk of using X11 forwarding is that the client's X11
1.52 jmc 1373: display server may be exposed to attack when the SSH client requests
1.13 stevesk 1374: forwarding (see the warnings for
1375: .Cm ForwardX11
1376: in
1.19 jmc 1377: .Xr ssh_config 5 ) .
1.13 stevesk 1378: A system administrator may have a stance in which they want to
1379: protect clients that may expose themselves to attack by unwittingly
1380: requesting X11 forwarding, which can warrant a
1381: .Dq no
1382: setting.
1383: .Pp
1384: Note that disabling X11 forwarding does not prevent users from
1385: forwarding X11 traffic, as users can always install their own forwarders.
1.1 stevesk 1386: X11 forwarding is automatically disabled if
1387: .Cm UseLogin
1388: is enabled.
1389: .It Cm X11UseLocalhost
1390: Specifies whether
1.52 jmc 1391: .Xr sshd 8
1.1 stevesk 1392: should bind the X11 forwarding server to the loopback address or to
1.15 jmc 1393: the wildcard address.
1394: By default,
1.52 jmc 1395: sshd binds the forwarding server to the loopback address and sets the
1.1 stevesk 1396: hostname part of the
1397: .Ev DISPLAY
1398: environment variable to
1399: .Dq localhost .
1.8 stevesk 1400: This prevents remote hosts from connecting to the proxy display.
1.1 stevesk 1401: However, some older X11 clients may not function with this
1402: configuration.
1403: .Cm X11UseLocalhost
1404: may be set to
1405: .Dq no
1406: to specify that the forwarding server should be bound to the wildcard
1407: address.
1408: The argument must be
1409: .Dq yes
1410: or
1411: .Dq no .
1412: The default is
1413: .Dq yes .
1414: .It Cm XAuthLocation
1.11 stevesk 1415: Specifies the full pathname of the
1.1 stevesk 1416: .Xr xauth 1
1417: program.
1418: The default is
1419: .Pa /usr/X11R6/bin/xauth .
1420: .El
1.55 jmc 1421: .Sh TIME FORMATS
1.53 jmc 1422: .Xr sshd 8
1.1 stevesk 1423: command-line arguments and configuration file options that specify time
1424: may be expressed using a sequence of the form:
1425: .Sm off
1.7 stevesk 1426: .Ar time Op Ar qualifier ,
1.1 stevesk 1427: .Sm on
1428: where
1429: .Ar time
1430: is a positive integer value and
1431: .Ar qualifier
1432: is one of the following:
1433: .Pp
1434: .Bl -tag -width Ds -compact -offset indent
1.64 jmc 1435: .It Aq Cm none
1.1 stevesk 1436: seconds
1437: .It Cm s | Cm S
1438: seconds
1439: .It Cm m | Cm M
1440: minutes
1441: .It Cm h | Cm H
1442: hours
1443: .It Cm d | Cm D
1444: days
1445: .It Cm w | Cm W
1446: weeks
1447: .El
1448: .Pp
1449: Each member of the sequence is added together to calculate
1450: the total time value.
1451: .Pp
1452: Time format examples:
1453: .Pp
1454: .Bl -tag -width Ds -compact -offset indent
1455: .It 600
1456: 600 seconds (10 minutes)
1457: .It 10m
1458: 10 minutes
1459: .It 1h30m
1460: 1 hour 30 minutes (90 minutes)
1461: .El
1462: .Sh FILES
1463: .Bl -tag -width Ds
1464: .It Pa /etc/ssh/sshd_config
1465: Contains configuration data for
1.53 jmc 1466: .Xr sshd 8 .
1.1 stevesk 1467: This file should be writable by root only, but it is recommended
1468: (though not necessary) that it be world-readable.
1469: .El
1.19 jmc 1470: .Sh SEE ALSO
1471: .Xr sshd 8
1.1 stevesk 1472: .Sh AUTHORS
1473: OpenSSH is a derivative of the original and free
1474: ssh 1.2.12 release by Tatu Ylonen.
1475: Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1476: Theo de Raadt and Dug Song
1477: removed many bugs, re-added newer features and
1478: created OpenSSH.
1479: Markus Friedl contributed the support for SSH
1480: protocol versions 1.5 and 2.0.
1481: Niels Provos and Markus Friedl contributed support
1482: for privilege separation.