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.176 2014/07/28 15:40:08 schwarze Exp $
37 .Dd $Mdocdate: July 28 2014 $
42 .Nd OpenSSH SSH daemon configuration file
44 .Nm /etc/ssh/sshd_config
47 reads configuration data from
48 .Pa /etc/ssh/sshd_config
49 (or the file specified with
52 The file contains keyword-argument pairs, one per line.
55 and empty lines are interpreted as comments.
56 Arguments may optionally be enclosed in double quotes
58 in order to represent arguments containing spaces.
61 keywords and their meanings are as follows (note that
62 keywords are case-insensitive and arguments are case-sensitive):
65 Specifies what environment variables sent by the client will be copied into
72 for how to configure the client.
73 Note that environment passing is only supported for protocol 2.
74 Variables are specified by name, which may contain the wildcard characters
78 Multiple environment variables may be separated by whitespace or spread
82 Be warned that some environment variables could be used to bypass restricted
84 For this reason, care should be taken in the use of this directive.
85 The default is not to accept any environment variables.
87 Specifies which address family should be used by
97 .It Cm AllowAgentForwarding
100 forwarding is permitted.
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.
107 This keyword can be followed by a list of group name patterns, separated
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.
113 The allow/deny directives are processed in the following order:
122 for more information on patterns.
123 .It Cm AllowTcpForwarding
124 Specifies whether TCP forwarding is permitted.
125 The available options are
129 to allow TCP forwarding,
131 to prevent all TCP forwarding,
133 to allow local (from the perspective of
137 to allow remote forwarding only.
140 Note that disabling TCP forwarding does not improve security unless
141 users are also denied shell access, as they can always install their
143 .It Cm AllowStreamLocalForwarding
144 Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
145 The available options are
149 to allow StreamLocal forwarding,
151 to prevent all StreamLocal forwarding,
153 to allow local (from the perspective of
157 to allow remote forwarding only.
160 Note that disabling StreamLocal forwarding does not improve security unless
161 users are also denied shell access, as they can always install their
164 This keyword can be followed by a list of user name patterns, separated
166 If specified, login is allowed only for user names that
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.
173 The allow/deny directives are processed in the following order:
182 for more information on patterns.
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
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.
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
206 depending on the server configuration.
208 .Dq keyboard-interactive:bsdauth
209 would restrict keyboard interactive authentication to the
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.
219 .It Cm AuthorizedKeysCommand
220 Specifies a program to be used to look up the user's public keys.
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
223 being authenticated, and should produce on standard output zero or
224 more lines of authorized_keys output (see AUTHORIZED_KEYS in
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
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.
235 .It Cm AuthorizedKeysFile
236 Specifies the file that contains the public keys that can be used
237 for user authentication.
238 The format is described in the
239 AUTHORIZED_KEYS FILE FORMAT
242 .Cm AuthorizedKeysFile
243 may contain tokens of the form %T which are substituted during connection
245 The following tokens are defined: %% is replaced by a literal '%',
246 %h is replaced by the home directory of the user being authenticated, and
247 %u is replaced by the username of that user.
249 .Cm AuthorizedKeysFile
250 is taken to be an absolute path or one relative to the user's home
252 Multiple files may be listed, separated by whitespace.
254 .Dq .ssh/authorized_keys .ssh/authorized_keys2 .
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.
262 Names are listed one per line preceded by key options (as described
263 in AUTHORIZED_KEYS FILE FORMAT in
265 Empty lines and comments starting with
269 .Cm AuthorizedPrincipalsFile
270 may contain tokens of the form %T which are substituted during connection
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.
276 .Cm AuthorizedPrincipalsFile
277 is taken to be an absolute path or one relative to the user's home
282 i.e. not to use a principals file \(en in this case, the username
283 of the user must appear in a certificate's principals list for it to be
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 ,
293 key option offers a similar facility (see
297 The contents of the specified file are sent to the remote user before
298 authentication is allowed.
301 then no banner is displayed.
302 This option is only available for protocol version 2.
303 By default, no banner is displayed.
304 .It Cm ChallengeResponseAuthentication
305 Specifies whether challenge-response authentication is allowed (e.g. via
306 PAM or through authentication styles supported in
310 .It Cm ChrootDirectory
311 Specifies the pathname of a directory to
313 to after authentication.
314 All components of the pathname must be root-owned directories that are
315 not writable by any other user or group.
318 changes the working directory to the user's home directory.
320 The pathname may contain the following tokens that are expanded at runtime once
321 the connecting user has been authenticated: %% is replaced by a literal '%',
322 %h is replaced by the home directory of the user being authenticated, and
323 %u is replaced by the username of that user.
327 must contain the necessary files and directories to support the
329 For an interactive session this requires at least a shell, typically
343 For file transfer sessions using
345 no additional configuration of the environment is necessary if the
346 in-process sftp server is used,
347 though sessions which use logging may require
349 inside the chroot directory on some operating systems (see
353 The default is not to
356 Specifies the ciphers allowed for protocol version 2.
357 Multiple ciphers must be comma-separated.
358 The supported ciphers are:
360 .Bl -item -compact -offset indent
376 aes128-gcm@openssh.com
378 aes256-gcm@openssh.com
390 chacha20-poly1305@openssh.com
394 .Bd -literal -offset indent
395 aes128-ctr,aes192-ctr,aes256-ctr,
396 aes128-gcm@openssh.com,aes256-gcm@openssh.com,
397 chacha20-poly1305@openssh.com
400 The list of available ciphers may also be obtained using the
404 .It Cm ClientAliveCountMax
405 Sets the number of client alive messages (see below) which may be
408 receiving any messages back from the client.
409 If this threshold is reached while client alive messages are being sent,
410 sshd will disconnect the client, terminating the session.
411 It is important to note that the use of client alive messages is very
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
420 The client alive mechanism is valuable when the client or
421 server depend on knowing when a connection has become inactive.
423 The default value is 3.
425 .Cm ClientAliveInterval
426 (see below) is set to 15, and
427 .Cm ClientAliveCountMax
428 is left at the default, unresponsive SSH clients
429 will be disconnected after approximately 45 seconds.
430 This option applies to protocol version 2 only.
431 .It Cm ClientAliveInterval
432 Sets a timeout interval in seconds after which if no data has been received
435 will send a message through the encrypted
436 channel to request a response from the client.
438 is 0, indicating that these messages will not be sent to the client.
439 This option applies to protocol version 2 only.
441 Specifies whether compression is allowed, or delayed until
442 the user has authenticated successfully.
451 This keyword can be followed by a list of group name patterns, separated
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.
457 The allow/deny directives are processed in the following order:
466 for more information on patterns.
468 This keyword can be followed by a list of user name patterns, separated
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.
476 The allow/deny directives are processed in the following order:
485 for more information on patterns.
487 Forces the execution of the command specified by
489 ignoring any command supplied by the client and
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
497 The command originally supplied by the client is available in the
498 .Ev SSH_ORIGINAL_COMMAND
499 environment variable.
500 Specifying a command of
502 will force the use of an in-process sftp server that requires no support
504 .Cm ChrootDirectory .
506 Specifies whether remote hosts are allowed to connect to ports
507 forwarded for the client.
510 binds remote port forwardings to the loopback address.
511 This prevents other remote hosts from connecting to forwarded ports.
513 can be used to specify that sshd
514 should allow remote port forwardings to bind to non-loopback addresses, thus
515 allowing other hosts to connect.
518 to force remote port forwardings to be available to the local host only,
520 to force remote port forwardings to bind to the wildcard address, or
522 to allow the client to select the address to which the forwarding is bound.
525 .It Cm GSSAPIAuthentication
526 Specifies whether user authentication based on GSSAPI is allowed.
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
535 Note that this option applies to protocol version 2 only.
536 .It Cm HostbasedAuthentication
537 Specifies whether rhosts or /etc/hosts.equiv authentication together
538 with successful public key client host authentication is allowed
539 (host-based authentication).
540 This option is similar to
541 .Cm RhostsRSAAuthentication
542 and applies to protocol version 2 only.
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
553 .Cm HostbasedAuthentication .
558 uses the name supplied by the client rather than
559 attempting to resolve the name from the TCP connection itself.
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
567 The default behaviour of
569 is not to load any certificates.
571 Specifies a file containing a private host key
574 .Pa /etc/ssh/ssh_host_key
575 for protocol version 1, and
576 .Pa /etc/ssh/ssh_host_dsa_key ,
577 .Pa /etc/ssh/ssh_host_ecdsa_key ,
578 .Pa /etc/ssh/ssh_host_ed25519_key
580 .Pa /etc/ssh/ssh_host_rsa_key
581 for protocol version 2.
584 will refuse to use a file if it is group/world-accessible.
585 It is possible to have multiple host key files.
587 keys are used for version 1 and
593 are used for version 2 of the SSH protocol.
594 It is also possible to specify public host key files instead.
595 In this case operations on the private key will be delegated
599 Identifies the UNIX-domain socket used to communicate
600 with an agent that has access to the private host keys.
603 is specified, the location of the socket will be read from the
605 environment variable.
611 files will not be used in
612 .Cm RhostsRSAAuthentication
614 .Cm HostbasedAuthentication .
618 .Pa /etc/ssh/shosts.equiv
622 .It Cm IgnoreUserKnownHosts
625 should ignore the user's
626 .Pa ~/.ssh/known_hosts
628 .Cm RhostsRSAAuthentication
630 .Cm HostbasedAuthentication .
634 Specifies the IPv4 type-of-service or DSCP class for the connection.
661 This option may take one or two arguments, separated by whitespace.
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.
667 for interactive sessions and
669 for non-interactive sessions.
670 .It Cm KbdInteractiveAuthentication
671 Specifies whether to allow keyboard-interactive authentication.
672 The argument to this keyword must be
676 The default is to use whatever value
677 .Cm ChallengeResponseAuthentication
681 .It Cm KerberosAuthentication
682 Specifies whether the password provided by the user for
683 .Cm PasswordAuthentication
684 will be validated through the Kerberos KDC.
685 To use this option, the server needs a
686 Kerberos servtab which allows the verification of the KDC's identity.
689 .It Cm KerberosGetAFSToken
690 If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
691 an AFS token before accessing the user's home directory.
694 .It Cm KerberosOrLocalPasswd
695 If password authentication through Kerberos fails then
696 the password will be validated via any additional local mechanism
701 .It Cm KerberosTicketCleanup
702 Specifies whether to automatically destroy the user's ticket cache
707 Specifies the available KEX (Key Exchange) algorithms.
708 Multiple algorithms must be comma-separated.
709 The supported algorithms are:
711 .Bl -item -compact -offset indent
713 curve25519-sha256@libssh.org
715 diffie-hellman-group1-sha1
717 diffie-hellman-group14-sha1
719 diffie-hellman-group-exchange-sha1
721 diffie-hellman-group-exchange-sha256
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,
735 diffie-hellman-group14-sha1
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
743 The key is never stored anywhere.
744 If the value is 0, the key is never regenerated.
745 The default is 3600 (seconds).
747 Specifies the local addresses
750 The following forms may be used:
752 .Bl -item -offset indent -compact
756 .Ar host No | Ar IPv4_addr No | Ar IPv6_addr
761 .Ar host No | Ar IPv4_addr No : Ar port
767 .Ar host No | Ar IPv6_addr Oc : Ar port
774 sshd will listen on the address and all prior
777 The default is to listen on all local addresses.
780 options are permitted.
783 options must precede this option for non-port qualified addresses.
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.
788 The default is 120 seconds.
790 Gives the verbosity level that is used when logging messages from
792 The possible values are:
793 QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
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.
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.
803 The algorithms that contain
805 calculate the MAC after encryption (encrypt-then-mac).
806 These are considered safer and their use recommended.
807 The supported MACs are:
809 .Bl -item -compact -offset indent
829 hmac-md5-etm@openssh.com
831 hmac-md5-96-etm@openssh.com
833 hmac-ripemd160-etm@openssh.com
835 hmac-sha1-etm@openssh.com
837 hmac-sha1-96-etm@openssh.com
839 hmac-sha2-256-etm@openssh.com
841 hmac-sha2-512-etm@openssh.com
843 umac-64-etm@openssh.com
845 umac-128-etm@openssh.com
849 .Bd -literal -offset indent
850 umac-64-etm@openssh.com,umac-128-etm@openssh.com,
851 hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
852 umac-64@openssh.com,umac-128@openssh.com,
853 hmac-sha2-256,hmac-sha2-512
856 Introduces a conditional block.
857 If all of the criteria on the
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
862 line or the end of the file.
863 If a keyword appears in multiple
865 blocks that are satisified, only the first instance of the keyword is
870 are one or more criteria-pattern pairs or the single token
872 which matches all criteria.
873 The available criteria are
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
888 criteria may additionally contain addresses to match in CIDR
889 address/masklen format, e.g.\&
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
895 or one with bits set in this host portion of the address.
902 Only a subset of keywords may be used on the lines following a
905 Available keywords are
907 .Cm AllowAgentForwarding ,
909 .Cm AllowTcpForwarding ,
911 .Cm AuthenticationMethods ,
912 .Cm AuthorizedKeysCommand ,
913 .Cm AuthorizedKeysCommandUser ,
914 .Cm AuthorizedKeysFile ,
915 .Cm AuthorizedPrincipalsFile ,
917 .Cm ChrootDirectory ,
922 .Cm GSSAPIAuthentication ,
923 .Cm HostbasedAuthentication ,
924 .Cm HostbasedUsesNameFromPacketOnly ,
925 .Cm KbdInteractiveAuthentication ,
926 .Cm KerberosAuthentication ,
929 .Cm PasswordAuthentication ,
930 .Cm PermitEmptyPasswords ,
932 .Cm PermitRootLogin ,
936 .Cm PubkeyAuthentication ,
938 .Cm RhostsRSAAuthentication ,
939 .Cm RSAAuthentication ,
940 .Cm X11DisplayOffset ,
943 .Cm X11UseLocalHost .
945 Specifies the maximum number of authentication attempts permitted per
947 Once the number of failures reaches half this value,
948 additional failures are logged.
951 Specifies the maximum number of open sessions permitted per network connection.
954 Specifies the maximum number of concurrent unauthenticated connections to the
956 Additional connections will be dropped until authentication succeeds or the
958 expires for a connection.
959 The default is 10:30:100.
961 Alternatively, random early drop can be enabled by specifying
962 the three colon separated values
966 will refuse connection attempts with a probability of
969 if there are currently
972 unauthenticated connections.
973 The probability increases linearly and all connection attempts
974 are refused if the number of unauthenticated connections reaches
977 .It Cm PasswordAuthentication
978 Specifies whether password authentication is allowed.
982 .Cm ChallengeResponseAuthentication
988 and the PAM authentication policy for
992 password authentication will be allowed through the challenge-response
993 mechanism regardless of the value of
994 .Cm PasswordAuthentication .
995 .It Cm PermitEmptyPasswords
996 When password authentication is allowed, it specifies whether the
997 server allows login to accounts with empty password strings.
1001 Specifies the destinations to which TCP port forwarding is permitted.
1002 The forwarding specification must be one of the following forms:
1004 .Bl -item -offset indent -compact
1013 .Ar IPv4_addr : port
1018 .Ar \&[ IPv6_addr \&] : port
1022 Multiple forwards may be specified by separating them with whitespace.
1025 can be used to remove all restrictions and permit any forwarding requests.
1028 can be used to prohibit all forwarding requests.
1029 By default all port forwarding requests are permitted.
1030 .It Cm PermitRootLogin
1031 Specifies whether root can log in using
1033 The argument must be
1035 .Dq without-password ,
1036 .Dq forced-commands-only ,
1042 .Cm ChallengeResponseAuthentication
1045 the root user may be allowed in with its password even if
1046 .Cm PermitRootLogin is set to
1047 .Dq without-password .
1049 If this option is set to
1050 .Dq without-password ,
1051 password authentication is disabled for root.
1053 If this option is set to
1054 .Dq forced-commands-only ,
1055 root login with public key authentication will be allowed,
1058 option has been specified
1059 (which may be useful for taking remote backups even if root login is
1060 normally not allowed).
1061 All other authentication methods are disabled for root.
1063 If this option is set to
1065 root is not allowed to log in.
1069 device forwarding is allowed.
1070 The argument must be
1088 allocation is permitted.
1091 .It Cm PermitUserEnvironment
1093 .Pa ~/.ssh/environment
1097 .Pa ~/.ssh/authorized_keys
1102 Enabling environment processing may enable users to bypass access
1103 restrictions in some configurations using mechanisms such as
1106 Specifies whether any
1112 Specifies the file that contains the process ID of the
1115 .Pa /var/run/sshd.pid .
1117 Specifies the port number that
1121 Multiple options of this type are permitted.
1127 should print the date and time of the last user login when a user logs
1136 when a user logs in interactively.
1137 (On some systems it is also printed by the shell,
1143 Specifies the protocol versions
1146 The possible values are
1150 Multiple versions must be comma-separated.
1153 Note that the order of the protocol list does not indicate preference,
1154 because the client selects among multiple protocol versions offered
1160 .It Cm PubkeyAuthentication
1161 Specifies whether public key authentication is allowed.
1164 Note that this option applies to protocol version 2 only.
1166 Specifies the maximum amount of data that may be transmitted before the
1167 session key is renegotiated, optionally followed a maximum amount of
1168 time that may pass before the session key is renegotiated.
1169 The first argument is specified in bytes and may have a suffix of
1174 to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1175 The default is between
1179 depending on the cipher.
1180 The optional second value is specified in seconds and may use any of the
1181 units documented in the
1184 The default value for
1188 which means that rekeying is performed after the cipher's default amount
1189 of data has been sent or received and no time based rekeying is done.
1190 This option applies to protocol version 2 only.
1192 Specifies revoked public keys.
1193 Keys listed in this file will be refused for public key authentication.
1194 Note that if this file is not readable, then public key authentication will
1195 be refused for all users.
1196 Keys may be specified as a text file, listing one public key per line, or as
1197 an OpenSSH Key Revocation List (KRL) as generated by
1199 For more information on KRLs, see the KEY REVOCATION LISTS section in
1201 .It Cm RhostsRSAAuthentication
1202 Specifies whether rhosts or
1203 .Pa /etc/hosts.equiv
1204 authentication together
1205 with successful RSA host authentication is allowed.
1208 This option applies to protocol version 1 only.
1209 .It Cm RSAAuthentication
1210 Specifies whether pure RSA authentication is allowed.
1213 This option applies to protocol version 1 only.
1214 .It Cm ServerKeyBits
1215 Defines the number of bits in the ephemeral protocol version 1 server key.
1216 The minimum value is 512, and the default is 1024.
1217 .It Cm StreamLocalBindMask
1218 Sets the octal file creation mode mask
1220 used when creating a Unix-domain socket file for local or remote
1222 This option is only used for port forwarding to a Unix-domain socket file.
1224 The default value is 0177, which creates a Unix-domain socket file that is
1225 readable and writable only by the owner.
1226 Note that not all operating systems honor the file mode on Unix-domain
1228 .It Cm StreamLocalBindUnlink
1229 Specifies whether to remove an existing Unix-domain socket file for local
1230 or remote port forwarding before creating a new one.
1231 If the socket file already exists and
1232 .Cm StreamLocalBindUnlink
1235 will be unable to forward the port to the Unix-domain socket file.
1236 This option is only used for port forwarding to a Unix-domain socket file.
1238 The argument must be
1247 should check file modes and ownership of the
1248 user's files and home directory before accepting login.
1249 This is normally desirable because novices sometimes accidentally leave their
1250 directory or files world-writable.
1253 Note that this does not apply to
1254 .Cm ChrootDirectory ,
1255 whose permissions and ownership are checked unconditionally.
1257 Configures an external subsystem (e.g. file transfer daemon).
1258 Arguments should be a subsystem name and a command (with optional arguments)
1259 to execute upon subsystem request.
1265 file transfer subsystem.
1267 Alternately the name
1269 implements an in-process
1272 This may simplify configurations using
1274 to force a different filesystem root on clients.
1276 By default no subsystems are defined.
1277 Note that this option applies to protocol version 2 only.
1278 .It Cm SyslogFacility
1279 Gives the facility code that is used when logging messages from
1281 The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1282 LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1283 The default is AUTH.
1285 Specifies whether the system should send TCP keepalive messages to the
1287 If they are sent, death of the connection or crash of one
1288 of the machines will be properly noticed.
1289 However, this means that
1290 connections will die if the route is down temporarily, and some people
1292 On the other hand, if TCP keepalives are not sent,
1293 sessions may hang indefinitely on the server, leaving
1295 users and consuming server resources.
1299 (to send TCP keepalive messages), and the server will notice
1300 if the network goes down or the client host crashes.
1301 This avoids infinitely hanging sessions.
1303 To disable TCP keepalive messages, the value should be set to
1305 .It Cm TrustedUserCAKeys
1306 Specifies a file containing public keys of certificate authorities that are
1307 trusted to sign user certificates for authentication.
1308 Keys are listed one per line; empty lines and comments starting with
1311 If a certificate is presented for authentication and has its signing CA key
1312 listed in this file, then it may be used for authentication for any user
1313 listed in the certificate's principals list.
1314 Note that certificates that lack a list of principals will not be permitted
1315 for authentication using
1316 .Cm TrustedUserCAKeys .
1317 For more details on certificates, see the CERTIFICATES section in
1322 should look up the remote host name and check that
1323 the resolved host name for the remote IP address maps back to the
1324 very same IP address.
1330 is used for interactive login sessions.
1335 is never used for remote command execution.
1336 Note also, that if this is enabled,
1338 will be disabled because
1340 does not know how to handle
1344 .Cm UsePrivilegeSeparation
1345 is specified, it will be disabled after authentication.
1347 Enables the Pluggable Authentication Module interface.
1350 this will enable PAM authentication using
1351 .Cm ChallengeResponseAuthentication
1353 .Cm PasswordAuthentication
1354 in addition to PAM account and session module processing for all
1355 authentication types.
1357 Because PAM challenge-response authentication usually serves an equivalent
1358 role to password authentication, you should disable either
1359 .Cm PasswordAuthentication
1361 .Cm ChallengeResponseAuthentication.
1365 is enabled, you will not be able to run
1370 .It Cm UsePrivilegeSeparation
1373 separates privileges by creating an unprivileged child process
1374 to deal with incoming network traffic.
1375 After successful authentication, another process will be created that has
1376 the privilege of the authenticated user.
1377 The goal of privilege separation is to prevent privilege
1378 escalation by containing any corruption within the unprivileged processes.
1382 .Cm UsePrivilegeSeparation
1385 then the pre-authentication unprivileged process is subject to additional
1387 .It Cm VersionAddendum
1388 Optionally specifies additional text to append to the SSH protocol banner
1389 sent by the server upon connection.
1391 .Dq DragonFly-20150122 .
1392 .It Cm X11DisplayOffset
1393 Specifies the first display number available for
1396 This prevents sshd from interfering with real X11 servers.
1398 .It Cm X11Forwarding
1399 Specifies whether X11 forwarding is permitted.
1400 The argument must be
1407 When X11 forwarding is enabled, there may be additional exposure to
1408 the server and to client displays if the
1410 proxy display is configured to listen on the wildcard address (see
1412 below), though this is not the default.
1413 Additionally, the authentication spoofing and authentication data
1414 verification and substitution occur on the client side.
1415 The security risk of using X11 forwarding is that the client's X11
1416 display server may be exposed to attack when the SSH client requests
1417 forwarding (see the warnings for
1420 .Xr ssh_config 5 ) .
1421 A system administrator may have a stance in which they want to
1422 protect clients that may expose themselves to attack by unwittingly
1423 requesting X11 forwarding, which can warrant a
1427 Note that disabling X11 forwarding does not prevent users from
1428 forwarding X11 traffic, as users can always install their own forwarders.
1429 X11 forwarding is automatically disabled if
1432 .It Cm X11UseLocalhost
1435 should bind the X11 forwarding server to the loopback address or to
1436 the wildcard address.
1438 sshd binds the forwarding server to the loopback address and sets the
1439 hostname part of the
1441 environment variable to
1443 This prevents remote hosts from connecting to the proxy display.
1444 However, some older X11 clients may not function with this
1449 to specify that the forwarding server should be bound to the wildcard
1451 The argument must be
1457 .It Cm XAuthLocation
1458 Specifies the full pathname of the
1462 .Pa /usr/X11R6/bin/xauth .
1466 command-line arguments and configuration file options that specify time
1467 may be expressed using a sequence of the form:
1469 .Ar time Op Ar qualifier ,
1473 is a positive integer value and
1475 is one of the following:
1477 .Bl -tag -width Ds -compact -offset indent
1492 Each member of the sequence is added together to calculate
1493 the total time value.
1495 Time format examples:
1497 .Bl -tag -width Ds -compact -offset indent
1499 600 seconds (10 minutes)
1503 1 hour 30 minutes (90 minutes)
1507 .It Pa /etc/ssh/sshd_config
1508 Contains configuration data for
1510 This file should be writable by root only, but it is recommended
1511 (though not necessary) that it be world-readable.
1516 OpenSSH is a derivative of the original and free
1517 ssh 1.2.12 release by Tatu Ylonen.
1518 Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1519 Theo de Raadt and Dug Song
1520 removed many bugs, re-added newer features and
1522 Markus Friedl contributed the support for SSH
1523 protocol versions 1.5 and 2.0.
1524 Niels Provos and Markus Friedl contributed support
1525 for privilege separation.