'\" te .\" Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. .TH sshd_config 4 "3 Dec 2015" "SunOS 5.11" "File Formats" .SH NAME sshd_config \- sshd configuration file .SH SYNOPSIS .LP .nf \fB/etc/ssh/sshd_config\fR .fi .SH DESCRIPTION .sp .LP The \fBsshd\fR(1M) daemon reads configuration data from \fB/etc/ssh/sshd_config\fR (or the file specified with \fBsshd\fR \fB-f\fR on the command line). The file contains keyword-value pairs, one per line. A line starting with a hash mark (\fB#\fR) and empty lines are interpreted as comments. .sp .LP The \fBsshd_config\fR file supports the following keywords. Unless otherwise noted, keywords and their arguments are case-insensitive. .sp .ne 2 .mk .na \fB\fBAllowGroups\fR\fR .ad .sp .6 .RS 4n This keyword can be followed by a number of group names, separated by spaces. If specified, login is allowed only for users whose primary group or supplementary group list matches one of the patterns. Asterisk (\fB*\fR) and question mark (\fB?\fR) can be used as wildcards in the patterns. Only group names are valid; a numerical group ID is not recognized. By default, login is allowed regardless of the primary group. .RE .sp .ne 2 .mk .na \fB\fBAllowTcpForwarding\fR\fR .ad .sp .6 .RS 4n Specifies whether TCP forwarding is permitted. The default is \fByes\fR. Disabling TCP forwarding does not improve security unless users are also denied shell access, as they can always install their own forwarders. .RE .sp .ne 2 .mk .na \fB\fBAllowUsers\fR\fR .ad .sp .6 .RS 4n This keyword can be followed by a number of user names, separated by spaces. If specified, login is allowed only for user names that match one of the patterns. Asterisk (\fB*\fR) and question mark (\fB?\fR) can be used as wildcards in the patterns. Only user names are valid; a numerical user ID is not recognized. By default login is allowed regardless of the user name. .sp If a specified pattern takes the form \fIuser\fR@\fIhost\fR then \fIuser\fR and \fIhost\fR are checked separately, restricting logins to particular users from particular hosts. .RE .sp .ne 2 .mk .na \fB\fBAuthorizedKeysFile\fR\fR .ad .sp .6 .RS 4n Specifies the file that contains the public keys that can be used for user authentication. \fBAuthorizedKeysFile\fR can contain tokens of the form \fB%T\fR, which are substituted during connection set-up. The following tokens are defined: \fB%%\fR is replaced by a literal \fB%\fR, \fB%h\fR is replaced by the home directory of the user being authenticated and \fB%u\fR is replaced by the username of that user. After expansion, \fBAuthorizedKeysFile\fR is taken to be an absolute path or one relative to the user's home directory. The default is \fB\&.ssh/authorized_keys\fR. .RE .sp .ne 2 .mk .na \fB\fBBanner\fR\fR .ad .sp .6 .RS 4n In some jurisdictions, sending a warning message before authentication can be relevant for getting legal protection. The contents of the specified file are sent to the remote user before authentication is allowed. This option is only available for protocol version 2. By default, no banner is displayed. .RE .sp .ne 2 .mk .na \fB\fBChrootDirectory\fR\fR .ad .sp .6 .RS 4n Specifies a path to \fBchroot\fR(2) to after authentication. This path, and all its components, must be root-owned directories that are not writable by any other user or group. .sp The server always tries to change to the user's home directory locally under the chrooted environment but a failure to do so is not considered an error. In addition, the path might contain the following tokens that are expanded at runtime once the connecting user has been authenticated: \fB%%\fR is replaced by a literal \fB%\fR, \fB%h\fR is replaced by the home directory of the user being authenticated, and \fB%u\fR is replaced by the username of that user. .sp The \fBChrootDirectory\fR must contain the necessary files and directories to support the user's session. For an interactive SSH session this requires at least a user's shell, shared libraries needed by the shell, dynamic linker, and possibly basic \fB/dev\fR nodes such as \fBnull\fR, \fBzero\fR, \fBstdin\fR, \fBstdout\fR, \fBstderr\fR, \fBrandom\fR, and \fBtty\fR. Additionally, terminal databases are needed for screen oriented applications. For file transfer sessions using \fBsftp\fR with the SSH protocol version 2, no additional configuration of the environment is necessary if the in-process \fBsftp\fR server is used. See \fBSubsystem\fR for details. .sp The default is not to \fBchroot\fR(2). .RE .sp .ne 2 .mk .na \fB\fBCiphers\fR\fR .ad .sp .6 .RS 4n Specifies the ciphers allowed for protocol version 2. Cipher ordering on the server side is not relevant. Multiple ciphers must be comma separated. .sp Valid ciphers are: \fBaes128-ctr, aes192-ctr, aes256-ctr, aes128-cbc, aes192-cbc, aes256-cbc, arcfour, arcfour128, arcfour256, 3des-cbc\fR, and \fBblowfish-cbc\fR. .sp The default cipher list is: .sp .in +2 .nf aes128-ctr,aes192-ctr,aes256-ctr,arcfour128, arcfour256,arcfour .fi .in -2 .sp Using CBC modes on the server side is not recommended due to potential security issues in connection with the SSH protocol version 2. .sp When configuring \fBsshd\fR to run OpenSSL in FIPS-140 mode, the default cipher list is: \fBaes128-cbc\fR, \fBaes192-cbc\fR, \fBaes256-cbc\fR. Specifying a non-FIPS approved cipher will return an error. .sp For the case of \fBssh\fR with FIPS-140 enabled logging into a non-FIPS-140 \fBsshd\fR, the supported and approved FIPS ciphers must be explicitly specified in \fBsshd_config\fR using "Ciphers" for this scenario. .RE .sp .ne 2 .mk .na \fB\fBClientAliveCountMax\fR\fR .ad .sp .6 .RS 4n Sets the number of client alive messages, (see \fBClientAliveInterval\fR), that can be sent without \fBsshd\fR receiving any messages back from the client. If this threshold is reached while client alive messages are being sent, \fBsshd\fR disconnects the client, terminating the session. The use of client alive messages is very different from \fBKeepAlive\fR. The client alive messages are sent through the encrypted channel and therefore are not spoofable. The TCP \fBkeepalive\fR option enabled by \fBKeepAlive\fR is spoofable. The client alive mechanism is valuable when a client or server depend on knowing when a connection has become inactive. .sp The default value is 3. If \fBClientAliveInterval\fR is set to 15, and \fBClientAliveCountMax\fR is left at the default, unresponsive \fBssh\fR clients are disconnected after approximately 45 seconds. .RE .sp .ne 2 .mk .na \fB\fBClientAliveInterval\fR\fR .ad .sp .6 .RS 4n Sets a timeout interval in seconds after which, if no data has been received from the client, \fBsshd\fR sends a message through the encrypted channel to request a response from the client. The default is 0, indicating that these messages are not sent to the client. This option applies only to protocol version 2. .RE .sp .ne 2 .mk .na \fB\fBCompression\fR\fR .ad .sp .6 .RS 4n Specifies whether compression is allowed or delayed, until the user has authenticated successfully. The argument must be \fByes\fR, \fBdelayed\fR, or \fBno\fR. The default is \fByes\fR. .RE .sp .ne 2 .mk .na \fB\fBDenyGroups\fR\fR .ad .sp .6 .RS 4n Can be followed by a number of group names, separated by spaces. Users whose primary or supplementary group matches one of the patterns are not allowed to log in. Asterisk (\fB*\fR) and question mark (\fB?\fR) can be used as wildcards in the patterns. Only group names are valid; a numerical group ID is not recognized. By default, login is allowed regardless of the primary group. .RE .sp .ne 2 .mk .na \fB\fBDenyUsers\fR\fR .ad .sp .6 .RS 4n Can be followed by a number of user names, separated by spaces. Login is disallowed for user names that match one of the patterns. Asterisk (\fB*\fR) and question mark (\fB?\fR) can be used as wildcards in the patterns. Only user names are valid; a numerical user ID is not recognized. By default, login is allowed regardless of the user name. .sp If a specified pattern takes the form \fIuser\fR\fB@\fR\fIhost\fR then \fIuser\fR and \fIhost\fR are checked separately, disallowing logins to particular users from particular hosts. .RE .sp .ne 2 .mk .na \fB\fBForceCommand\fR\fR .ad .sp .6 .RS 4n Forces the execution of the command specified by \fBForceCommand\fR, ignoring any command supplied by the client, and, if present, \fB~/.ssh/rc\fR. The command is invoked by using the user's login shell with the \fB-c\fR option. This applies to shell, command, or subsystem execution. It is most useful inside a Match block. The command originally supplied by the client is available in the \fBSSH_ORIGINAL_COMMAND\fR environment variable. Specifying a command of \fBinternal-sftp\fR forces the use of an in-process \fBsftp\fR server that requires no support files when used with \fBChrootDirectory\fR. .RE .sp .ne 2 .mk .na \fB\fBGatewayPorts\fR\fR .ad .sp .6 .RS 4n Specifies whether remote hosts are allowed to connect to ports forwarded for the client. By default, \fBsshd\fR binds remote port forwarding to the loopback address. This prevents other remote hosts from connecting to forwarded ports. \fBGatewayPorts\fR can be used to specify that \fBsshd\fR should bind remote port forwarding to the wildcard address, thus allowing remote hosts to connect to forwarded ports. .sp The argument can be \fBno\fR to force remote port forwarding to be available to the local host only, \fByes\fR to force remote port forwardings to bind to the wildcard address, or \fBclientspecified\fR to allow the client to select the address to which the forwarding is bound. The default is \fBno\fR. See also \fBRemoteForward\fR in \fBssh_config\fR(4). .RE .sp .ne 2 .mk .na \fB\fBGSSAPIAuthentication\fR\fR .ad .sp .6 .RS 4n Enables/disables GSS-API user authentication. The default is \fByes\fR. .sp Currently \fBsshd\fR authorizes client user principals to user accounts as follows: if the principal name matches the requested user account, then the principal is authorized. Otherwise, GSS-API authentication fails. .RE .sp .ne 2 .mk .na \fB\fBGSSAPIKeyExchange\fR\fR .ad .sp .6 .RS 4n Enables/disables GSS-API-authenticated key exchanges. The default is \fByes\fR. .sp This option also enables the use of the GSS-API to authenticate the user to server after the key exchange. GSS-API key exchange can succeed but the subsequent authentication using the GSS-API fail if the server does not authorize the user's GSS principal name to the target user account. .sp Currently \fBsshd\fR authorizes client user principals to user accounts as follows: if the principal name matches the requested user account, then the principal is authorized. Otherwise, GSS-API authentication fails. .RE .sp .ne 2 .mk .na \fB\fBGSSAPIStoreDelegatedCredentials\fR\fR .ad .sp .6 .RS 4n Enables/disables the use of delegated GSS-API credentials on the server-side. The default is \fByes\fR. .sp Specifically, this option, when enabled, causes the server to store delegated GSS-API credentials in the user's default GSS-API credential store (which for the Kerberos V mechanism means \fB/tmp/krb5cc_\fI\fR\fR). .sp \fBsshd\fR does not take any steps to explicitly destroy stored delegated GSS-API credentials upon logout. It is the responsibility of PAM modules to destroy credentials associated with a session. .RE .sp .ne 2 .mk .na \fB\fBHostbasedAuthentication\fR\fR .ad .sp .6 .RS 4n Specifies whether to try \fBrhosts\fR-based authentication with public key authentication. The argument must be \fByes\fR or \fBno\fR. The default is \fBno\fR. This option applies to protocol version 2 only and is similar to \fBRhostsRSAAuthentication\fR. See \fBsshd\fR(1M) for guidelines on setting up host-based authentication. .RE .sp .ne 2 .mk .na \fB\fBHostbasedUsesNameFromPacketOnly\fR\fR .ad .sp .6 .RS 4n Controls which hostname is searched for in the files \fB~/.shosts\fR, \fB/etc/shosts.equiv\fR, and \fB/etc/hosts.equiv\fR. If this parameter is set to \fByes\fR, the server uses the name the client claimed for itself and signed with that host's key. If set to \fBno\fR, the default, the server uses the name to which the client's IP address resolves. .sp Setting this parameter to \fBno\fR disables host-based authentication when using NAT or when the client gets to the server indirectly through a port-forwarding firewall. .RE .sp .ne 2 .mk .na \fB\fBHostKey\fR\fR .ad .sp .6 .RS 4n Specifies the file containing the private host key used by SSH. The default is /etc/ssh/ssh_host_rsa_key and\fB/etc/ssh/ssh_host_dsa_key\fR for protocol version 2. \fBsshd\fR refuses to use a file if it is group/world-accessible. It is possible to have multiple host key files. dsa or rsa keys are used for version 2 of the SSH protocol. .RE .sp .ne 2 .mk .na \fB\fBIgnoreRhosts\fR\fR .ad .sp .6 .RS 4n Specifies that \fB\&.rhosts\fR and \fB\&.shosts\fR files are not used in authentication. \fB/etc/hosts.equiv\fR and \fB/etc/shosts.equiv\fR are still used. The default is \fByes\fR. .RE .sp .ne 2 .mk .na \fB\fBIgnoreUserKnownHosts\fR\fR .ad .sp .6 .RS 4n Specifies whether \fBsshd\fR should ignore the user's \fB$HOME/.ssh/known_hosts\fR during \fBRhostsRSAAuthentication\fR. The default is \fBno\fR. .RE .sp .ne 2 .mk .na \fB\fBKbdInteractiveAuthentication\fR\fR .ad .sp .6 .RS 4n Specifies whether authentication by means of the \fBkeyboard-interactive\fR authentication method is allowed. Defaults to \fByes\fR .RE .sp .ne 2 .mk .na \fB\fBKeepAlive\fR\fR .ad .sp .6 .RS 4n Specifies whether the system should send \fBkeepalive\fR messages to the other side. If they are sent, death of the connection or crash of one of the machines is properly noticed. However, this means that connections die if the route is down temporarily, which can be an annoyance. On the other hand, if \fBkeepalives\fR are not sent, sessions can hang indefinitely on the server, leaving ghost users and consuming server resources. .sp The default is \fByes\fR (to send \fBkeepalives\fR), and the server notices if the network goes down or the client host reboots. This avoids infinitely hanging sessions. .sp To disable \fBkeepalives\fR, the value should be set to \fBno\fR in both the server and the client configuration files. .RE .sp .ne 2 .mk .na \fB\fBKMFPolicyDatabase\fR\fR .ad .sp .6 .RS 4n A filename for the KMF policy database. If not set, KMF defaults to \fB/etc/security/kmfpolicy.xml\fR. See the \fBUsing X.509 Certificates\fR section in the \fBsshd\fR(1M) man page. .RE .sp .ne 2 .mk .na \fB\fBKMFPolicyName\fR\fR .ad .sp .6 .RS 4n A name of the KMF policy to be used. If not set, \fBdefault\fR is used. See the \fBUsing X.509 Certificates\fR section in the \fBsshd\fR(1M) man page. .RE .sp .ne 2 .mk .na \fB\fBListenAddress\fR\fR .ad .sp .6 .RS 4n Specifies what local address \fBsshd\fR should listen on. The following forms can be used: .sp .in +2 .nf ListenAddress \fIhost\fR|\fIIPv4_addr\fR|\fIIPv6_addr\fR ListenAddress \fIhost\fR|\fIIPv4_addr\fR:\fIport\fR ListenAddress [\fIhost\fR|\fIIPv6_addr\fR]:\fIport\fR .fi .in -2 If \fIport\fR is not specified, \fBsshd\fR listens on the address and all prior \fBPort\fR options specified. The default is to listen on all local addresses. Multiple \fBListenAddress\fR options are permitted. Additionally, any \fBPort\fR options must precede this option for non-port qualified addresses. .sp The default is to listen on all local addresses. Multiple options of this type are permitted. Additionally, the \fBPorts\fR options must precede this option. .RE .sp .ne 2 .mk .na \fB\fBLoginGraceTime\fR\fR .ad .sp .6 .RS 4n The server disconnects after this time (in seconds) if the user has not successfully logged in. If the value is 0, there is no time limit. The default is 120 (seconds). .RE .sp .ne 2 .mk .na \fB\fBLogLevel\fR\fR .ad .sp .6 .RS 4n Gives the verbosity level that is used when logging messages from \fBsshd\fR. The possible values are: \fBQUIET\fR, \fBFATAL\fR, \fBERROR\fR, \fBINFO\fR, \fBVERBOSE\fR, \fBDEBUG\fR, \fBDEBUG1\fR, \fBDEBUG2\fR, and \fBDEBUG3\fR. The default is \fBINFO\fR. DEBUG2 and DEBUG3 each specify higher levels of debugging output. Logging with level \fBDEBUG\fR violates the privacy of users and is not recommended. .RE .sp .ne 2 .mk .na \fB\fBLookupClientHostnames\fR\fR .ad .sp .6 .RS 4n Specifies whether or not to reverse lookup the names of client's addresses. Setting this parameter to \fBno\fR can be useful where name resolution might be broken and thus cause \fBsshd\fR to spend a lot of time trying to resolve the client's IP address to a name. Defaults to \fByes\fR. See \fBVerifyReverseMapping\fR. .sp It is an error to set up a Match Block with Host matching and also set \fBLookupClientHostnames\fR to \fBno\fR in \fBsshd_config\fR. .sp If there is a Match Block with Host matching, then even if \fBLookupClientHostnames\fR is set to \fBno\fR, \fBLookupClientHostnames\fR will be re-enabled, so that the security requirements of the match block are honored. In such a case, \fBsshd\fR issues an error message to the console, and will also \fBsyslog\fR an ERROR if someone logs in while the misconfiguration remains in the \fBsshd_config\fR file. .RE .sp .ne 2 .mk .na \fBMACs\fR .ad .sp .6 .RS 4n Specifies the available MAC (message authentication code) algorithms. The MAC algorithm is used in protocol version 2 for data integrity protection. Multiple algorithms must be comma-separated. The default is \fBhmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96, hmac-sha2-256, hmac-sha2-256-96, hmac-sha2-512,\fR and \fBhmac-sha2-512-96\fR. .sp When configuring \fBsshd\fR to run OpenSSL in FIPS-140 mode, the default is \fBhmac-sha1\fR, \fBhmac-sha1-96\fR, \fBhmac-sha2-256\fR, \fBhmac-sha2-256-96\fR, \fBhmac-sha2-512\fR, and \fBhmac-sha2-512-96\fR. Specifying a non-FIPS approved MAC algorithm will return an error. .RE .sp .ne 2 .mk .na \fB\fBMatch\fR\fR .ad .sp .6 .RS 4n Introduces a conditional block. If all of the criteria on the Match line are satisfied, the keywords on the following lines override those set in the global section of the \fBconfig\fR file, until either another Match line or the end of the file. Match blocks must be located at the end of the file, after all the global settings. .sp The arguments to Match are one or more criteria-pattern pairs. The available criteria are \fBUser\fR, \fBGroup\fR, \fBHost\fR, and \fBAddress\fR. The match patterns can consist of single entries or comma-separated lists and can use the wildcard (Asterisk \fB*\fR and question mark \fB?\fR) and negation (\fB!\fR) operators. .sp The patterns in a Host criteria should be hostname. The patterns in an Address criteria should be an IP address, which can additionally contain addresses to match in CIDR address/masklen format, for example, \fB192.0.2.0/24\fR or \fB2001:DB8::/32\fR. The mask length provided must be consistent with the address - it is an error to specify a mask length that is too long for the address or one with bits set in this host portion of the address. For example, \fB192.0.2.0/33\fR and \fB192.0.2.0/8\fR respectively. .sp Only a subset of keywords can be used on the lines following a Match keyword. Available keywords are \fBAllowTcpForwarding, AuthorizedKeysFile, Banner, ChrootDirectory, ForceCommand, GatewayPorts, GSSAPIAuthentication, HostbasedAuthentication, HostbasedUsesNameFromPacketOnly,KbdInteractiveAuthentication, MaxAuthTries, PasswordAuthentication, PermitEmptyPasswords, PermitRootLogin, PubkeyAuthentication, RhostsRSAAuthentication, RSAAuthentication, X11DisplayOffset, X11Forwarding\fR, and \fBX11UseLocalhost\fR. .sp The following are four examples of using \fBMatch\fR: .RS +4 .TP 1. Disallowing user \fBtestuser\fR to use TCP forwarding .sp .in +2 .nf Match User testuser AllowTcpForwarding no .fi .in -2 .RE .RS +4 .TP 2. Displaying a special banner for users not in the \fBstaff\fR group .sp .in +2 .nf Match Group *,!staff Banner /etc/banner.text .fi .in -2 .RE .RS +4 .TP 3. Allowing root login from host \fBrootallowed.example.com\fR .sp .in +2 .nf Match Host rootallowed.example.com PermitRootLogin yes .fi .in -2 .RE .RS +4 .TP 4. Allowing anyone to use \fBGatewayPorts\fR from the local net .sp .in +2 .nf Match Address 192.168.0.0/24 GatewayPorts yes .fi .in -2 .RE .RE .sp .ne 2 .mk .na \fB\fBMaxAuthTries\fR\fR .ad .sp .6 .RS 4n Specifies the maximum number of authentication attempts permitted per connection. Once the number of failures reaches half this value, additional failures are logged. The default value is 6. .RE .sp .ne 2 .mk .na \fB\fBMaxStartups\fR\fR .ad .sp .6 .RS 4n Specifies the maximum number of concurrent unauthenticated connections to the \fBsshd\fR daemon. Additional connections are dropped until authentication succeeds or the \fBLoginGraceTime\fR expires for a connection. The default is \fB10:30:100\fR. .sp Alternatively, random early drop can be enabled by specifying the three colon-separated values \fB\fIstart\fR:\fIrate\fR:\fIfull\fR\fR (for example, \fB10:30:60\fR). Referring to this example, \fBsshd\fR refuse connection attempts with a probability of \fIrate\fR/100 (30% in our example) if there are currently 10 (from the \fIstart\fR field) unauthenticated connections. The probability increases linearly and all connection attempts are refused if the number of unauthenticated connections reaches \fIfull\fR (60 in our example). .sp The default is \fB10:30:100\fR. .RE .sp .ne 2 .mk .na \fB\fBPAMServiceName\fR\fR .ad .sp .6 .RS 4n Specifies the PAM service name for the PAM session. The \fBPAMServiceName\fR and \fBPAMServicePrefix\fR options are mutually exclusive and if both set, \fBsshd\fR does not start. If this option is set the service name is the same for all user authentication methods. The option has no default value. See \fBPAMServicePrefix\fR for more information. .RE .sp .ne 2 .mk .na \fB\fBPAMServicePrefix\fR\fR .ad .sp .6 .RS 4n Specifies the PAM service name prefix for service names used for individual user authentication methods. The default is \fBsshd\fR. The \fBPAMServiceName\fR and \fBPAMServicePrefix\fR options are mutually exclusive and if both set, \fBsshd\fR does not start. .sp For example, if this option is set to \fBadmincli\fR, the service name for the keyboard-interactive authentication method is \fBadmincli-kbdint\fR instead of the default \fBsshd-kbdint\fR. .RE .sp .ne 2 .mk .na \fB\fBPasswordAuthentication\fR\fR .ad .sp .6 .RS 4n Specifies whether password authentication is allowed. The default is \fByes\fR. .RE .sp .ne 2 .mk .na \fB\fBPermitEmptyPasswords\fR\fR .ad .sp .6 .RS 4n When password or keyboard-interactive authentication is allowed, it specifies whether the server allows login to accounts with empty password strings. .sp If not set then the \fB/etc/default/login\fR \fBPASSREQ\fR value is used instead. .sp \fBPASSREQ=no\fR is equivalent to \fBPermitEmptyPasswords yes\fR. \fBPASSREQ=yes\fR is equivalent to \fBPermitEmptyPasswords no\fR. If neither \fBPermitEmptyPasswords\fR or \fBPASSREQ\fR are set the default is \fBno\fR. .RE .sp .ne 2 .mk .na \fB\fBPermitRootLogin\fR\fR .ad .sp .6 .RS 4n Specifies whether the root can log in using \fBssh\fR(1). The argument must be \fByes\fR, \fBwithout-password\fR, \fBforced-commands-only\fR, or \fBno\fR. \fBwithout-password\fR means that root cannot be authenticated using the "password" or "keyboard-interactive" methods (see description of \fBKbdInteractiveAuthentication\fR). \fBforced-commands-only\fR means that authentication is allowed only for \fBpublickey\fR (for SSHv2, or RSA, for SSHv1) and only if the matching \fBauthorized_keys entry\fR for root has a \fBcommand=\fR\fI\fR option. .sp In Solaris, the default \fB/etc/ssh/sshd_config\fR file is shipped with \fBPermitRootLogin\fR set to \fBno\fR. If unset by the administrator, then \fBCONSOLE\fR parameter from \fB/etc/default/login\fR supplies the default value as follows: if the \fBCONSOLE\fR parameter is not commented out (it can even be empty, that is, "\fBCONSOLE=\fR"), then \fBwithout-password\fR is used as default value. If \fBCONSOLE\fR is commented out, then the default for \fBPermitRootLogin\fR is \fByes\fR. .sp The \fBwithout-password\fR and \fBforced-commands-only\fR settings are useful for, for example, performing remote administration and backups using trusted public keys for authentication of the remote client, without allowing access to the root account using passwords. .RE .sp .ne 2 .mk .na \fB\fBPermitUserEnvironment\fR\fR .ad .sp .6 .RS 4n Specifies whether a user's \fB~/.ssh/environment\fR on the server side and \fBenvironment\fR options in the \fBAuthorizedKeysFile\fR file are processed by \fBsshd\fR. The default is \fBno\fR. Enabling environment processing can enable users to bypass access restrictions in some configurations using mechanisms such as \fBLD_PRELOAD\fR. .sp Environment setting from a relevant entry in \fBAuthorizedKeysFile\fR file is processed only if the user was authenticated using the public key authentication method. Of the two files used, values of variables set in \fB~/.ssh/environment\fR are of higher priority. .RE .sp .ne 2 .mk .na \fB\fBPidFile\fR\fR .ad .sp .6 .RS 4n Allows you to specify an alternative to \fB/var/run/sshd.pid\fR, the default file for storing the PID of the \fBsshd\fR listening for connections. See \fBsshd\fR(1M). .RE .sp .ne 2 .mk .na \fB\fBPort\fR\fR .ad .sp .6 .RS 4n Specifies the port number that \fBsshd\fR listens on. The default is 22. Multiple options of this type are permitted. See also \fBListenAddress\fR. .RE .sp .ne 2 .mk .na \fB\fBPreUserauthHook\fR\fR .ad .sp .6 .RS 4n Specifies an executable which is run prior to any of the processed authentication methods. The executable can be used to synchronize user information with a remote user-management facility using an arbitrary communication protocol. .sp The executable is run before any user validation is conducted by \fBSSHD\fR so the user is not required to be existent before she tries to log in. .sp The executable is invoked with two arguments in the following order: the name of the current authentication method and the username. The environment variable \fBSSH_CONNECTION\fR is also passed to the executable. If the executable returns a zero exit status, the current authentication method is processed as normal. See \fBsshd\fR(1M). .sp If the exit status is \fB1\fR, the current authentication method is ignored and can not be used to validate the user. The executable must be owned by root and have permissions of \fB0500\fR, otherwise it is treated as if it has exited with status \fB1\fR. .sp There is no default value for this property. .RE .sp .ne 2 .mk .na \fB\fBPrintLastLog\fR\fR .ad .sp .6 .RS 4n Specifies whether \fBsshd\fR should display the date and time when the user last logged in. On Solaris this option is always ignored since \fBpam_unix_session\fR(5) reports the last login time. .RE .sp .ne 2 .mk .na \fB\fBPrintMotd\fR\fR .ad .sp .6 .RS 4n Specifies whether \fBsshd\fR should display the contents of \fB/etc/motd\fR when a user logs in interactively. (On some systems it is also displayed by the shell or a shell startup file, such as \fB/etc/profile\fR.) The default is \fByes\fR. .RE .sp .ne 2 .mk .na \fB\fBProtocol\fR\fR .ad .sp .6 .RS 4n Specifies the protocol versions \fBsshd\fR should support in order of preference. The option is left for backwards compatibility and only value \fB2\fR is supported. The default is \fB2\fR. .RE .sp .ne 2 .mk .na \fB\fBPubkeyAuthentication\fR\fR .ad .sp .6 .RS 4n Specifies whether public key authentication is allowed. The default is \fByes\fR. This option applies to protocol version 2 only. .RE .sp .ne 2 .mk .na \fB\fBStrictModes\fR\fR .ad .sp .6 .RS 4n Specifies whether \fBsshd\fR should check file modes and ownership of the user's files and home directory before accepting login. This is normally desirable because novices sometimes accidentally leave their directory or files world-writable. The default is \fByes\fR. .RE .sp .ne 2 .mk .na \fB\fBSubsystem\fR\fR .ad .sp .6 .RS 4n Configures an external subsystem (for example, a file transfer daemon). Arguments should be a subsystem name and a command to execute upon subsystem request. The command \fBsftp-server\fR(1M) implements the \fBsftp\fR file transfer subsystem. .sp Alternately, the name \fBinternal-sftp\fR implements an in-process \fBsftp\fR server. This can simplify configurations using \fBChrootDirectory\fR to force a different filesystem root on clients. .sp To specify an option to the internal \fBsftp\fR server, simply add the \fBsftp-server\fR option to the end of line. For example, .sp .in +2 .nf #sftp subsystem Subsystem sftp internal-sftp -u 002 .fi .in -2 .sp By default, no subsystems are defined. This option applies to protocol version 2 only. .RE .sp .ne 2 .mk .na \fB\fBTrustedAnchorKeystore\fR\fR .ad .sp .6 .RS 4n Specifies a directory where certificates of trusted anchors are located. Those certificates are used to validate host certificates if used as host keys. .sp Currently only one level certificate chains are supported. This means that certificates must be signed by a private key that corresponds to a certificate located in the directory set by this option. Host key certificates can be self-signed as well. See the \fBUsing X.509 Certificates\fR section in the \fBsshd\fR(1M) man page. .RE .sp .ne 2 .mk .na \fB\fBSyslogFacility\fR\fR .ad .sp .6 .RS 4n Gives the facility code that is used when logging messages from \fBsshd\fR. The possible values are: \fBDAEMON\fR, \fBUSER\fR, \fBAUTH\fR, \fBLOCAL0\fR, \fBLOCAL1\fR, \fBLOCAL2\fR, \fBLOCAL3\fR, \fBLOCAL4\fR, \fBLOCAL5\fR, \fBLOCAL6\fR, and \fBLOCAL7\fR. The default is \fBAUTH\fR. .RE .sp .ne 2 .mk .na \fB\fBUseFIPS140\fR\fR .ad .sp .6 .RS 4n Specifies whether \fBsshd\fR will run OpenSSL in FIPS-140 mode. The default is \fBno\fR. A \fByes\fR setting will allow \fBsshd\fR to use the FIPS capable crypto modules in OpenSSL. .RE .sp .ne 2 .mk .na \fB\fBUseOpenSSLEngine\fR\fR .ad .sp .6 .RS 4n Specifies whether \fBsshd\fR should use the OpenSSL PKCS#11 engine for offloading cryptographic operations to the Cryptographic Framework. Cryptographic operations are accelerated according to the available installed plug-ins. When no suitable plug-ins are present this option does not have an effect. The default is \fByes\fR. .sp If \fBsshd\fR is configured to run OpenSSL in FIPS-140 mode, the default is \fBno\fR. The setting of \fBUseOpenSSLEngine\fR to \fByes\fR does not have an effect in FIPS-140 mode. .RE .sp .ne 2 .mk .na \fB\fBVerifyReverseMapping\fR\fR .ad .sp .6 .RS 4n Specifies whether \fBsshd\fR should try to verify the remote host name and check that the resolved host name for the remote IP address maps back to the very same IP address. .sp A \fByes\fR setting means verify. This feature is useful for Internet-facing servers. The default is \fBno\fR. .sp The option is only usable if \fBLookupClientHostnames\fR is set to \fByes\fR. .RE .sp .ne 2 .mk .na \fB\fBX11DisplayOffset\fR\fR .ad .sp .6 .RS 4n Specifies the first display number available for \fBsshd\fR's X11 forwarding. This prevents \fBsshd\fR from interfering with real X11 servers. The default is 10. .RE .sp .ne 2 .mk .na \fB\fBX11Forwarding\fR\fR .ad .sp .6 .RS 4n Specifies whether X11 forwarding is permitted. The default is \fByes\fR. Disabling X11 forwarding does not improve security in any way, as users can always install their own forwarders. .sp When X11 forwarding is enabled, there can be additional exposure to the server and to client displays if the \fBsshd\fR proxy display is configured to listen on the wildcard address (see \fBX11UseLocalhost\fR). However, this is not the default. Additionally, the authentication spoofing and authentication data verification and substitution occur on the client side. The security risk of using X11 forwarding is that the client's X11 display server can be exposed to attack when the \fBssh\fR client requests forwarding (see the warnings for \fBForwardX11\fR in \fBssh_config\fR(4)). A system administrator who wants to protect clients that expose themselves to attack by unwittingly requesting X11 forwarding, should specify a \fBno\fR setting. .sp Disabling X11 forwarding does not prevent users from forwarding X11 traffic, as users can always install their own forwarders. .RE .sp .ne 2 .mk .na \fB\fBX11UseLocalhost\fR\fR .ad .sp .6 .RS 4n Specifies whether \fBsshd\fR should bind the X11 forwarding server to the loopback address or to the wildcard address. By default, \fBsshd\fR binds the forwarding server to the loopback address and sets the hostname part of the \fBDISPLAY\fR environment variable to \fBlocalhost\fR. This prevents remote hosts from connecting to the proxy display. However, some older X11 clients might not function with this configuration. \fBX11UseLocalhost\fR can be set to \fBno\fR to specify that the forwarding server should be bound to the wildcard address. The argument must be \fByes\fR or \fBno\fR. The default is \fByes\fR. .RE .sp .ne 2 .mk .na \fB\fBXAuthLocation\fR\fR .ad .sp .6 .RS 4n Specifies the location of the \fBxauth\fR(1) program. The default is \fB/usr/X11/bin/xauth\fR and \fBsshd\fR attempts to open it when X11 forwarding is enabled. .RE .SS "Time Formats" .sp .LP \fBsshd\fR command-line arguments and configuration file options that specify time can be expressed using a sequence of the form: \fItime\fR[\fIqualifier\fR,] where \fItime\fR is a positive integer value and \fIqualifier\fR is one of the following: .sp .ne 2 .mk .na \fB\fI\fR\fR .ad .RS 10n .rt seconds .RE .sp .ne 2 .mk .na \fB\fBs\fR | \fBS\fR\fR .ad .RS 10n .rt seconds .RE .sp .ne 2 .mk .na \fB\fBm\fR | \fBM\fR\fR .ad .RS 10n .rt minutes .RE .sp .ne 2 .mk .na \fB\fBh\fR | \fBH\fR\fR .ad .RS 10n .rt hours .RE .sp .ne 2 .mk .na \fB\fBd\fR | \fBD\fR\fR .ad .RS 10n .rt days .RE .sp .ne 2 .mk .na \fB\fBw\fR | \fB\fR\fR .ad .RS 10n .rt weeks .RE .sp .LP Each element of the sequence is added together to calculate the total time value. For example: .sp .ne 2 .mk .na \fB\fB600\fR\fR .ad .RS 9n .rt 600 seconds (10 minutes) .RE .sp .ne 2 .mk .na \fB\fB10m\fR\fR .ad .RS 9n .rt 10 minutes .RE .sp .ne 2 .mk .na \fB\fB1h30m\fR\fR .ad .RS 9n .rt 1 hour, 30 minutes (90 minutes) .RE .SH FILES .sp .ne 2 .mk .na \fB\fB/etc/ssh/sshd_config\fR\fR .ad .RS 24n .rt Contains configuration data for \fBsshd\fR. This file should be writable by root only, but it is recommended (though not necessary) that it be world-readable. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitynetwork/ssh _ Interface StabilityUncommitted .TE .SH SEE ALSO .sp .LP \fBlogin\fR(1), \fBsshd\fR(1M), \fBchroot\fR(2), \fBssh_config\fR(4), \fBattributes\fR(5), \fBkerberos\fR(5), \fBpam_unix_session\fR(5) .SH AUTHORS .sp .LP OpenSSH is a derivative of the original and free \fBssh\fR 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt, and Dug Song removed many bugs, re-added recent features, and created OpenSSH. Markus Friedl contributed the support for SSH protocol versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support for privilege separation.