2 .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
3 .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 .\" All rights reserved
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".
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.
16 .\" Redistribution and use in source and binary forms, with or without
17 .\" modification, are permitted provided that the following conditions
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.
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.
36 .\" $OpenBSD: sshd_config.5,v 1.156 2013/02/06 00:20:42 dtucker Exp $
43 .Nd OpenSSH SSH daemon configuration file
45 .Nm /etc/ssh/sshd_config
48 reads configuration data from
49 .Pa /etc/ssh/sshd_config
50 (or the file specified with
53 The file contains keyword-argument pairs, one per line.
56 and empty lines are interpreted as comments.
57 Arguments may optionally be enclosed in double quotes
59 in order to represent arguments containing spaces.
62 keywords and their meanings are as follows (note that
63 keywords are case-insensitive and arguments are case-sensitive):
66 Specifies what environment variables sent by the client will be copied into
73 for how to configure the client.
74 Note that environment passing is only supported for protocol 2.
75 Variables are specified by name, which may contain the wildcard characters
79 Multiple environment variables may be separated by whitespace or spread
83 Be warned that some environment variables could be used to bypass restricted
85 For this reason, care should be taken in the use of this directive.
86 The default is not to accept any environment variables.
88 Specifies which address family should be used by
98 .It Cm AllowAgentForwarding
101 forwarding is permitted.
104 Note that disabling agent forwarding does not improve security
105 unless users are also denied shell access, as they can always install
106 their own forwarders.
108 This keyword can be followed by a list of group name patterns, separated
110 If specified, login is allowed only for users whose primary
111 group or supplementary group list matches one of the patterns.
112 Only group names are valid; a numerical group ID is not recognized.
113 By default, login is allowed for all groups.
114 The allow/deny directives are processed in the following order:
125 for more information on patterns.
126 .It Cm AllowTcpForwarding
127 Specifies whether TCP forwarding is permitted.
128 The available options are
132 to allow TCP forwarding,
134 to prevent all TCP forwarding,
136 to allow local (from the perspective of
140 to allow remote forwarding only.
143 Note that disabling TCP forwarding does not improve security unless
144 users are also denied shell access, as they can always install their
147 This keyword can be followed by a list of user name patterns, separated
149 If specified, login is allowed only for user names that
150 match one of the patterns.
151 Only user names are valid; a numerical user ID is not recognized.
152 By default, login is allowed for all users.
153 If the pattern takes the form USER@HOST then USER and HOST
154 are separately checked, restricting logins to particular
155 users from particular hosts.
156 The allow/deny directives are processed in the following order:
167 for more information on patterns.
168 .It Cm AuthenticationMethods
169 Specifies the authentication methods that must be successfully completed
170 for a user to be granted access.
171 This option must be followed by one or more comma-separated lists of
172 authentication method names.
173 Successful authentication requires completion of every method in at least
176 For example, an argument of
177 .Dq publickey,password publickey,keyboard-interactive
178 would require the user to complete public key authentication, followed by
179 either password or keyboard interactive authentication.
180 Only methods that are next in one or more lists are offered at each stage,
181 so for this example, it would not be possible to attempt password or
182 keyboard-interactive authentication before public key.
184 This option is only available for SSH protocol 2 and will yield a fatal
185 error if enabled if protocol 1 is also enabled.
186 Note that each authentication method listed should also be explicitly enabled
187 in the configuration.
188 The default is not to require multiple authentication; successful completion
189 of a single authentication method is sufficient.
190 .It Cm AuthorizedKeysCommand
191 Specifies a program to be used to look up the user's public keys.
192 The program will be invoked with a single argument of the username
193 being authenticated, and should produce on standard output zero or
194 more lines of authorized_keys output (see
198 If a key supplied by AuthorizedKeysCommand does not successfully authenticate
199 and authorize the user then public key authentication continues using the usual
200 .Cm AuthorizedKeysFile
202 By default, no AuthorizedKeysCommand is run.
203 .It Cm AuthorizedKeysCommandUser
204 Specifies the user under whose account the AuthorizedKeysCommand is run.
205 It is recommended to use a dedicated user that has no other role on the host
206 than running authorized keys commands.
207 .It Cm AuthorizedKeysFile
208 Specifies the file that contains the public keys that can be used
209 for user authentication.
210 The format is described in the
211 .Sx AUTHORIZED_KEYS FILE FORMAT
214 .Cm AuthorizedKeysFile
215 may contain tokens of the form %T which are substituted during connection
217 The following tokens are defined: %% is replaced by a literal '%',
218 %h is replaced by the home directory of the user being authenticated, and
219 %u is replaced by the username of that user.
221 .Cm AuthorizedKeysFile
222 is taken to be an absolute path or one relative to the user's home
224 Multiple files may be listed, separated by whitespace.
226 .Dq .ssh/authorized_keys .ssh/authorized_keys2 .
227 .It Cm AuthorizedPrincipalsFile
228 Specifies a file that lists principal names that are accepted for
229 certificate authentication.
230 When using certificates signed by a key listed in
231 .Cm TrustedUserCAKeys ,
232 this file lists names, one of which must appear in the certificate for it
233 to be accepted for authentication.
234 Names are listed one per line preceded by key options (as described
236 .Sx AUTHORIZED_KEYS FILE FORMAT
239 Empty lines and comments starting with
243 .Cm AuthorizedPrincipalsFile
244 may contain tokens of the form %T which are substituted during connection
246 The following tokens are defined: %% is replaced by a literal '%',
247 %h is replaced by the home directory of the user being authenticated, and
248 %u is replaced by the username of that user.
250 .Cm AuthorizedPrincipalsFile
251 is taken to be an absolute path or one relative to the user's home
256 i.e. not to use a principals file \(en in this case, the username
257 of the user must appear in a certificate's principals list for it to be
260 .Cm AuthorizedPrincipalsFile
261 is only used when authentication proceeds using a CA listed in
262 .Cm TrustedUserCAKeys
263 and is not consulted for certification authorities trusted via
264 .Pa ~/.ssh/authorized_keys ,
267 key option offers a similar facility (see
271 The contents of the specified file are sent to the remote user before
272 authentication is allowed.
275 then no banner is displayed.
276 This option is only available for protocol version 2.
277 By default, no banner is displayed.
278 .It Cm ChallengeResponseAuthentication
279 Specifies whether challenge-response authentication is allowed (e.g. via
280 PAM or though authentication styles supported in
284 .It Cm ChrootDirectory
285 Specifies the pathname of a directory to
287 to after authentication.
288 All components of the pathname must be root-owned directories that are
289 not writable by any other user or group.
292 changes the working directory to the user's home directory.
294 The pathname may contain the following tokens that are expanded at runtime once
295 the connecting user has been authenticated: %% is replaced by a literal '%',
296 %h is replaced by the home directory of the user being authenticated, and
297 %u is replaced by the username of that user.
301 must contain the necessary files and directories to support the
303 For an interactive session this requires at least a shell, typically
317 For file transfer sessions using
319 no additional configuration of the environment is necessary if the
320 in-process sftp server is used,
321 though sessions which use logging do require
323 inside the chroot directory (see
327 The default is not to
330 Specifies the ciphers allowed for protocol version 2.
331 Multiple ciphers must be comma-separated.
332 The supported ciphers are
340 .Dq aes128-gcm@openssh.com ,
341 .Dq aes256-gcm@openssh.com ,
349 .Bd -literal -offset 3n
350 aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
351 aes128-gcm@openssh.com,aes256-gcm@openssh.com,
352 aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
355 .It Cm ClientAliveCountMax
356 Sets the number of client alive messages (see below) which may be
359 receiving any messages back from the client.
360 If this threshold is reached while client alive messages are being sent,
361 sshd will disconnect the client, terminating the session.
362 It is important to note that the use of client alive messages is very
366 The client alive messages are sent through the encrypted channel
367 and therefore will not be spoofable.
368 The TCP keepalive option enabled by
371 The client alive mechanism is valuable when the client or
372 server depend on knowing when a connection has become inactive.
374 The default value is 3.
376 .Cm ClientAliveInterval
377 (see below) is set to 15, and
378 .Cm ClientAliveCountMax
379 is left at the default, unresponsive SSH clients
380 will be disconnected after approximately 45 seconds.
381 This option applies to protocol version 2 only.
382 .It Cm ClientAliveInterval
383 Sets a timeout interval in seconds after which if no data has been received
386 will send a message through the encrypted
387 channel to request a response from the client.
389 is 0, indicating that these messages will not be sent to the client.
390 This option applies to protocol version 2 only.
392 Specifies whether compression is allowed, or delayed until
393 the user has authenticated successfully.
402 This keyword can be followed by a list of group name patterns, separated
404 Login is disallowed for users whose primary group or supplementary
405 group list matches one of the patterns.
406 Only group names are valid; a numerical group ID is not recognized.
407 By default, login is allowed for all groups.
408 The allow/deny directives are processed in the following order:
419 for more information on patterns.
421 This keyword can be followed by a list of user name patterns, separated
423 Login is disallowed for user names that match one of the patterns.
424 Only user names are valid; a numerical user ID is not recognized.
425 By default, login is allowed for all users.
426 If the pattern takes the form USER@HOST then USER and HOST
427 are separately checked, restricting logins to particular
428 users from particular hosts.
429 The allow/deny directives are processed in the following order:
440 for more information on patterns.
442 Forces the execution of the command specified by
444 ignoring any command supplied by the client and
447 The command is invoked by using the user's login shell with the -c option.
448 This applies to shell, command, or subsystem execution.
449 It is most useful inside a
452 The command originally supplied by the client is available in the
453 .Ev SSH_ORIGINAL_COMMAND
454 environment variable.
455 Specifying a command of
457 will force the use of an in-process sftp server that requires no support
459 .Cm ChrootDirectory .
461 Specifies whether remote hosts are allowed to connect to ports
462 forwarded for the client.
465 binds remote port forwardings to the loopback address.
466 This prevents other remote hosts from connecting to forwarded ports.
468 can be used to specify that sshd
469 should allow remote port forwardings to bind to non-loopback addresses, thus
470 allowing other hosts to connect.
473 to force remote port forwardings to be available to the local host only,
475 to force remote port forwardings to bind to the wildcard address, or
477 to allow the client to select the address to which the forwarding is bound.
480 .It Cm GSSAPIAuthentication
481 Specifies whether user authentication based on GSSAPI is allowed.
484 Note that this option applies to protocol version 2 only.
485 .It Cm GSSAPICleanupCredentials
486 Specifies whether to automatically destroy the user's credentials cache
490 Note that this option applies to protocol version 2 only.
491 .It Cm HostbasedAuthentication
492 Specifies whether rhosts or /etc/hosts.equiv authentication together
493 with successful public key client host authentication is allowed
494 (host-based authentication).
495 This option is similar to
496 .Cm RhostsRSAAuthentication
497 and applies to protocol version 2 only.
500 .It Cm HostbasedUsesNameFromPacketOnly
501 Specifies whether or not the server will attempt to perform a reverse
502 name lookup when matching the name in the
508 .Cm HostbasedAuthentication .
513 uses the name supplied by the client rather than
514 attempting to resolve the name from the TCP connection itself.
517 .It Cm HostCertificate
518 Specifies a file containing a public host certificate.
519 The certificate's public key must match a private host key already specified
522 The default behaviour of
524 is not to load any certificates.
526 Specifies a file containing a private host key
529 .Pa /etc/ssh/ssh_host_key
530 for protocol version 1, and
531 .Pa /etc/ssh/ssh_host_dsa_key ,
532 .Pa /etc/ssh/ssh_host_ecdsa_key
534 .Pa /etc/ssh/ssh_host_rsa_key
535 for protocol version 2.
538 will refuse to use a file if it is group/world-accessible.
539 It is possible to have multiple host key files.
541 keys are used for version 1 and
546 are used for version 2 of the SSH protocol.
552 files will not be used in
553 .Cm RhostsRSAAuthentication
555 .Cm HostbasedAuthentication .
559 .Pa /etc/ssh/shosts.equiv
563 .It Cm IgnoreUserKnownHosts
566 should ignore the user's
567 .Pa ~/.ssh/known_hosts
569 .Cm RhostsRSAAuthentication
571 .Cm HostbasedAuthentication .
575 Specifies the IPv4 type-of-service or DSCP class for the connection.
602 This option may take one or two arguments, separated by whitespace.
603 If one argument is specified, it is used as the packet class unconditionally.
604 If two values are specified, the first is automatically selected for
605 interactive sessions and the second for non-interactive sessions.
608 for interactive sessions and
610 for non-interactive sessions.
611 .It Cm KerberosAuthentication
612 Specifies whether the password provided by the user for
613 .Cm PasswordAuthentication
614 will be validated through the Kerberos KDC.
615 To use this option, the server needs a
616 Kerberos servtab which allows the verification of the KDC's identity.
619 .It Cm KerberosGetAFSToken
620 If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
621 an AFS token before accessing the user's home directory.
624 .It Cm KerberosOrLocalPasswd
625 If password authentication through Kerberos fails then
626 the password will be validated via any additional local mechanism
631 .It Cm KerberosTicketCleanup
632 Specifies whether to automatically destroy the user's ticket cache
637 Specifies the available KEX (Key Exchange) algorithms.
638 Multiple algorithms must be comma-separated.
640 .Dq ecdh-sha2-nistp256 ,
641 .Dq ecdh-sha2-nistp384 ,
642 .Dq ecdh-sha2-nistp521 ,
643 .Dq diffie-hellman-group-exchange-sha256 ,
644 .Dq diffie-hellman-group-exchange-sha1 ,
645 .Dq diffie-hellman-group14-sha1 ,
646 .Dq diffie-hellman-group1-sha1 .
647 .It Cm KeyRegenerationInterval
648 In protocol version 1, the ephemeral server key is automatically regenerated
649 after this many seconds (if it has been used).
650 The purpose of regeneration is to prevent
651 decrypting captured sessions by later breaking into the machine and
653 The key is never stored anywhere.
654 If the value is 0, the key is never regenerated.
655 The default is 3600 (seconds).
657 Specifies the local addresses
660 The following forms may be used:
662 .Bl -item -offset indent -compact
666 .Ar host No | Ar IPv4_addr No | Ar IPv6_addr
671 .Ar host No | Ar IPv4_addr No : Ar port
677 .Ar host No | Ar IPv6_addr Oc : Ar port
684 sshd will listen on the address and all prior
687 The default is to listen on all local addresses.
690 options are permitted.
693 options must precede this option for non-port qualified addresses.
694 .It Cm LoginGraceTime
695 The server disconnects after this time if the user has not
696 successfully logged in.
697 If the value is 0, there is no time limit.
698 The default is 120 seconds.
700 Gives the verbosity level that is used when logging messages from
702 The possible values are:
703 QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
705 DEBUG and DEBUG1 are equivalent.
706 DEBUG2 and DEBUG3 each specify higher levels of debugging output.
707 Logging with a DEBUG level violates the privacy of users and is not recommended.
709 Specifies the available MAC (message authentication code) algorithms.
710 The MAC algorithm is used in protocol version 2
711 for data integrity protection.
712 Multiple algorithms must be comma-separated.
713 The algorithms that contain
715 calculate the MAC after encryption (encrypt-then-mac).
716 These are considered safer and their use recommended.
718 .Bd -literal -offset indent
719 hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,
720 umac-64-etm@openssh.com,umac-128-etm@openssh.com,
721 hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
722 hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,
723 hmac-md5-96-etm@openssh.com,
724 hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,
725 hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
726 hmac-sha1-96,hmac-md5-96
729 Introduces a conditional block.
730 If all of the criteria on the
732 line are satisfied, the keywords on the following lines override those
733 set in the global section of the config file, until either another
735 line or the end of the file.
739 are one or more criteria-pattern pairs.
740 The available criteria are
748 The match patterns may consist of single entries or comma-separated
749 lists and may use the wildcard and negation operators described in the
756 criteria may additionally contain addresses to match in CIDR
757 address/masklen format, e.g.\&
761 Note that the mask length provided must be consistent with the address -
762 it is an error to specify a mask length that is too long for the address
763 or one with bits set in this host portion of the address.
770 Only a subset of keywords may be used on the lines following a
773 Available keywords are
775 .Cm AllowAgentForwarding ,
777 .Cm AllowTcpForwarding ,
779 .Cm AuthenticationMethods ,
780 .Cm AuthorizedKeysCommand ,
781 .Cm AuthorizedKeysCommandUser ,
782 .Cm AuthorizedKeysFile ,
783 .Cm AuthorizedPrincipalsFile ,
785 .Cm ChrootDirectory ,
790 .Cm GSSAPIAuthentication ,
791 .Cm HostbasedAuthentication ,
792 .Cm HostbasedUsesNameFromPacketOnly ,
793 .Cm KbdInteractiveAuthentication ,
794 .Cm KerberosAuthentication ,
797 .Cm PasswordAuthentication ,
798 .Cm PermitEmptyPasswords ,
800 .Cm PermitRootLogin ,
802 .Cm PubkeyAuthentication ,
803 .Cm RhostsRSAAuthentication ,
804 .Cm RSAAuthentication ,
805 .Cm X11DisplayOffset ,
808 .Cm X11UseLocalHost .
810 Specifies the maximum number of authentication attempts permitted per
812 Once the number of failures reaches half this value,
813 additional failures are logged.
816 Specifies the maximum number of open sessions permitted per network connection.
819 Specifies the maximum number of concurrent unauthenticated connections to the
821 Additional connections will be dropped until authentication succeeds or the
823 expires for a connection.
824 The default is 10:30:100.
826 Alternatively, random early drop can be enabled by specifying
827 the three colon separated values
831 will refuse connection attempts with a probability of
834 if there are currently
837 unauthenticated connections.
838 The probability increases linearly and all connection attempts
839 are refused if the number of unauthenticated connections reaches
842 .It Cm PasswordAuthentication
843 Specifies whether password authentication is allowed.
848 .It Cm PermitEmptyPasswords
849 When password authentication is allowed, it specifies whether the
850 server allows login to accounts with empty password strings.
854 Specifies the destinations to which TCP port forwarding is permitted.
855 The forwarding specification must be one of the following forms:
857 .Bl -item -offset indent -compact
871 .Ar \&[ IPv6_addr \&] : port
875 Multiple forwards may be specified by separating them with whitespace.
878 can be used to remove all restrictions and permit any forwarding requests.
881 can be used to prohibit all forwarding requests.
882 By default all port forwarding requests are permitted.
883 .It Cm PermitRootLogin
884 Specifies whether root can log in using
888 .Dq without-password ,
889 .Dq forced-commands-only ,
895 .Cm ChallengeResponseAuthentication
898 the root user may be allowed in with its password even if
899 .Cm PermitRootLogin is set to
900 .Dq without-password .
902 If this option is set to
903 .Dq without-password ,
904 password authentication is disabled for root.
906 If this option is set to
907 .Dq forced-commands-only ,
908 root login with public key authentication will be allowed,
911 option has been specified
912 (which may be useful for taking remote backups even if root login is
913 normally not allowed).
914 All other authentication methods are disabled for root.
916 If this option is set to
918 root is not allowed to log in.
922 device forwarding is allowed.
938 .It Cm PermitUserEnvironment
940 .Pa ~/.ssh/environment
944 .Pa ~/.ssh/authorized_keys
949 Enabling environment processing may enable users to bypass access
950 restrictions in some configurations using mechanisms such as
953 Specifies the file that contains the process ID of the
956 .Pa /var/run/sshd.pid .
958 Specifies the port number that
962 Multiple options of this type are permitted.
968 should print the date and time of the last user login when a user logs
977 when a user logs in interactively.
978 (On some systems it is also printed by the shell,
984 Specifies the protocol versions
987 The possible values are
991 Multiple versions must be comma-separated.
994 Note that the order of the protocol list does not indicate preference,
995 because the client selects among multiple protocol versions offered
1001 .It Cm PubkeyAuthentication
1002 Specifies whether public key authentication is allowed.
1005 Note that this option applies to protocol version 2 only.
1007 Specifies revoked public keys.
1008 Keys listed in this file will be refused for public key authentication.
1009 Note that if this file is not readable, then public key authentication will
1010 be refused for all users.
1011 Keys may be specified as a text file, listing one public key per line, or as
1012 an OpenSSH Key Revocation List (KRL) as generated by
1014 For more information on KRLs, see the
1015 .Sx KEY REVOCATION LISTS
1018 .It Cm RhostsRSAAuthentication
1019 Specifies whether rhosts or
1020 .Pa /etc/hosts.equiv
1021 authentication together
1022 with successful RSA host authentication is allowed.
1025 This option applies to protocol version 1 only.
1026 .It Cm RSAAuthentication
1027 Specifies whether pure RSA authentication is allowed.
1030 This option applies to protocol version 1 only.
1031 .It Cm ServerKeyBits
1032 Defines the number of bits in the ephemeral protocol version 1 server key.
1033 The minimum value is 512, and the default is 1024.
1037 should check file modes and ownership of the
1038 user's files and home directory before accepting login.
1039 This is normally desirable because novices sometimes accidentally leave their
1040 directory or files world-writable.
1043 Note that this does not apply to
1044 .Cm ChrootDirectory ,
1045 whose permissions and ownership are checked unconditionally.
1047 Configures an external subsystem (e.g. file transfer daemon).
1048 Arguments should be a subsystem name and a command (with optional arguments)
1049 to execute upon subsystem request.
1055 file transfer subsystem.
1057 Alternately the name
1059 implements an in-process
1062 This may simplify configurations using
1064 to force a different filesystem root on clients.
1066 By default no subsystems are defined.
1067 Note that this option applies to protocol version 2 only.
1068 .It Cm SyslogFacility
1069 Gives the facility code that is used when logging messages from
1071 The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1072 LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1073 The default is AUTH.
1075 Specifies whether the system should send TCP keepalive messages to the
1077 If they are sent, death of the connection or crash of one
1078 of the machines will be properly noticed.
1079 However, this means that
1080 connections will die if the route is down temporarily, and some people
1082 On the other hand, if TCP keepalives are not sent,
1083 sessions may hang indefinitely on the server, leaving
1085 users and consuming server resources.
1089 (to send TCP keepalive messages), and the server will notice
1090 if the network goes down or the client host crashes.
1091 This avoids infinitely hanging sessions.
1093 To disable TCP keepalive messages, the value should be set to
1095 .It Cm TrustedUserCAKeys
1096 Specifies a file containing public keys of certificate authorities that are
1097 trusted to sign user certificates for authentication.
1098 Keys are listed one per line; empty lines and comments starting with
1101 If a certificate is presented for authentication and has its signing CA key
1102 listed in this file, then it may be used for authentication for any user
1103 listed in the certificate's principals list.
1104 Note that certificates that lack a list of principals will not be permitted
1105 for authentication using
1106 .Cm TrustedUserCAKeys .
1107 For more details on certificates, see the
1114 should look up the remote host name and check that
1115 the resolved host name for the remote IP address maps back to the
1116 very same IP address.
1122 is used for interactive login sessions.
1127 is never used for remote command execution.
1128 Note also, that if this is enabled,
1130 will be disabled because
1132 does not know how to handle
1136 .Cm UsePrivilegeSeparation
1137 is specified, it will be disabled after authentication.
1139 Enables the Pluggable Authentication Module interface.
1142 this will enable PAM authentication using
1143 .Cm ChallengeResponseAuthentication
1145 .Cm PasswordAuthentication
1146 in addition to PAM account and session module processing for all
1147 authentication types.
1149 Because PAM challenge-response authentication usually serves an equivalent
1150 role to password authentication, you should disable either
1151 .Cm PasswordAuthentication
1153 .Cm ChallengeResponseAuthentication.
1157 is enabled, you will not be able to run
1162 .It Cm UsePrivilegeSeparation
1165 separates privileges by creating an unprivileged child process
1166 to deal with incoming network traffic.
1167 After successful authentication, another process will be created that has
1168 the privilege of the authenticated user.
1169 The goal of privilege separation is to prevent privilege
1170 escalation by containing any corruption within the unprivileged processes.
1174 .Cm UsePrivilegeSeparation
1177 then the pre-authentication unprivileged process is subject to additional
1179 .It Cm VersionAddendum
1180 Optionally specifies additional text to append to the SSH protocol banner
1181 sent by the server upon connection.
1183 .Dq FreeBSD-20130515 .
1184 .It Cm X11DisplayOffset
1185 Specifies the first display number available for
1188 This prevents sshd from interfering with real X11 servers.
1190 .It Cm X11Forwarding
1191 Specifies whether X11 forwarding is permitted.
1192 The argument must be
1199 When X11 forwarding is enabled, there may be additional exposure to
1200 the server and to client displays if the
1202 proxy display is configured to listen on the wildcard address (see
1204 below), though this is not the default.
1205 Additionally, the authentication spoofing and authentication data
1206 verification and substitution occur on the client side.
1207 The security risk of using X11 forwarding is that the client's X11
1208 display server may be exposed to attack when the SSH client requests
1209 forwarding (see the warnings for
1212 .Xr ssh_config 5 ) .
1213 A system administrator may have a stance in which they want to
1214 protect clients that may expose themselves to attack by unwittingly
1215 requesting X11 forwarding, which can warrant a
1219 Note that disabling X11 forwarding does not prevent users from
1220 forwarding X11 traffic, as users can always install their own forwarders.
1221 X11 forwarding is automatically disabled if
1224 .It Cm X11UseLocalhost
1227 should bind the X11 forwarding server to the loopback address or to
1228 the wildcard address.
1230 sshd binds the forwarding server to the loopback address and sets the
1231 hostname part of the
1233 environment variable to
1235 This prevents remote hosts from connecting to the proxy display.
1236 However, some older X11 clients may not function with this
1241 to specify that the forwarding server should be bound to the wildcard
1243 The argument must be
1249 .It Cm XAuthLocation
1250 Specifies the full pathname of the
1254 .Pa /usr/local/bin/xauth .
1258 command-line arguments and configuration file options that specify time
1259 may be expressed using a sequence of the form:
1261 .Ar time Op Ar qualifier ,
1265 is a positive integer value and
1267 is one of the following:
1269 .Bl -tag -width Ds -compact -offset indent
1284 Each member of the sequence is added together to calculate
1285 the total time value.
1287 Time format examples:
1289 .Bl -tag -width Ds -compact -offset indent
1291 600 seconds (10 minutes)
1295 1 hour 30 minutes (90 minutes)
1299 .It Pa /etc/ssh/sshd_config
1300 Contains configuration data for
1302 This file should be writable by root only, but it is recommended
1303 (though not necessary) that it be world-readable.
1308 OpenSSH is a derivative of the original and free
1309 ssh 1.2.12 release by Tatu Ylonen.
1310 Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1311 Theo de Raadt and Dug Song
1312 removed many bugs, re-added newer features and
1314 Markus Friedl contributed the support for SSH
1315 protocol versions 1.5 and 2.0.
1316 Niels Provos and Markus Friedl contributed support
1317 for privilege separation.