Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1 | .\" -*- nroff -*- |
| 2 | .\" |
| 3 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> |
| 4 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
| 5 | .\" All rights reserved |
| 6 | .\" |
| 7 | .\" As far as I am concerned, the code I have written for this software |
| 8 | .\" can be used freely for any purpose. Any derived versions of this |
| 9 | .\" software must be clearly marked as such, and if the derived work is |
| 10 | .\" incompatible with the protocol description in the RFC file, it must be |
| 11 | .\" called by a name other than "ssh" or "Secure Shell". |
| 12 | .\" |
| 13 | .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. |
| 14 | .\" Copyright (c) 1999 Aaron Campbell. All rights reserved. |
| 15 | .\" Copyright (c) 1999 Theo de Raadt. All rights reserved. |
| 16 | .\" |
| 17 | .\" Redistribution and use in source and binary forms, with or without |
| 18 | .\" modification, are permitted provided that the following conditions |
| 19 | .\" are met: |
| 20 | .\" 1. Redistributions of source code must retain the above copyright |
| 21 | .\" notice, this list of conditions and the following disclaimer. |
| 22 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| 23 | .\" notice, this list of conditions and the following disclaimer in the |
| 24 | .\" documentation and/or other materials provided with the distribution. |
| 25 | .\" |
| 26 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 27 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 28 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 29 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 30 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 31 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 32 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 33 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 34 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 35 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 36 | .\" |
Damien Miller | c6db99e | 2010-03-05 10:41:45 +1100 | [diff] [blame] | 37 | .\" $OpenBSD: sshd_config.5,v 1.120 2010/03/04 23:17:25 djm Exp $ |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 38 | .Dd $Mdocdate: March 4 2010 $ |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 39 | .Dt SSHD_CONFIG 5 |
| 40 | .Os |
| 41 | .Sh NAME |
| 42 | .Nm sshd_config |
| 43 | .Nd OpenSSH SSH daemon configuration file |
| 44 | .Sh SYNOPSIS |
Damien Miller | d94fc72 | 2007-01-05 16:29:30 +1100 | [diff] [blame] | 45 | .Nm /etc/ssh/sshd_config |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 46 | .Sh DESCRIPTION |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 47 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 48 | reads configuration data from |
| 49 | .Pa /etc/ssh/sshd_config |
| 50 | (or the file specified with |
| 51 | .Fl f |
| 52 | on the command line). |
| 53 | The file contains keyword-argument pairs, one per line. |
| 54 | Lines starting with |
| 55 | .Ql # |
| 56 | and empty lines are interpreted as comments. |
Damien Miller | 306d118 | 2006-03-15 12:05:59 +1100 | [diff] [blame] | 57 | Arguments may optionally be enclosed in double quotes |
| 58 | .Pq \&" |
| 59 | in order to represent arguments containing spaces. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 60 | .Pp |
| 61 | The possible |
| 62 | keywords and their meanings are as follows (note that |
| 63 | keywords are case-insensitive and arguments are case-sensitive): |
| 64 | .Bl -tag -width Ds |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 65 | .It Cm AcceptEnv |
| 66 | Specifies what environment variables sent by the client will be copied into |
| 67 | the session's |
| 68 | .Xr environ 7 . |
| 69 | See |
| 70 | .Cm SendEnv |
| 71 | in |
| 72 | .Xr ssh_config 5 |
| 73 | for how to configure the client. |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 74 | Note that environment passing is only supported for protocol 2. |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 75 | Variables are specified by name, which may contain the wildcard characters |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 76 | .Ql * |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 77 | and |
| 78 | .Ql \&? . |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 79 | Multiple environment variables may be separated by whitespace or spread |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 80 | across multiple |
| 81 | .Cm AcceptEnv |
| 82 | directives. |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 83 | Be warned that some environment variables could be used to bypass restricted |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 84 | user environments. |
| 85 | For this reason, care should be taken in the use of this directive. |
| 86 | The default is not to accept any environment variables. |
Darren Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 87 | .It Cm AddressFamily |
| 88 | Specifies which address family should be used by |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 89 | .Xr sshd 8 . |
Darren Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 90 | Valid arguments are |
| 91 | .Dq any , |
| 92 | .Dq inet |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 93 | (use IPv4 only), or |
Darren Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 94 | .Dq inet6 |
| 95 | (use IPv6 only). |
| 96 | The default is |
| 97 | .Dq any . |
Damien Miller | e989019 | 2008-05-19 14:59:02 +1000 | [diff] [blame] | 98 | .It Cm AllowAgentForwarding |
| 99 | Specifies whether |
| 100 | .Xr ssh-agent 1 |
| 101 | forwarding is permitted. |
| 102 | The default is |
| 103 | .Dq yes . |
| 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. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 107 | .It Cm AllowGroups |
| 108 | This keyword can be followed by a list of group name patterns, separated |
| 109 | by spaces. |
| 110 | If specified, login is allowed only for users whose primary |
| 111 | group or supplementary group list matches one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 112 | Only group names are valid; a numerical group ID is not recognized. |
| 113 | By default, login is allowed for all groups. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 114 | The allow/deny directives are processed in the following order: |
| 115 | .Cm DenyUsers , |
| 116 | .Cm AllowUsers , |
| 117 | .Cm DenyGroups , |
| 118 | and finally |
| 119 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 120 | .Pp |
| 121 | See |
| 122 | .Sx PATTERNS |
| 123 | in |
| 124 | .Xr ssh_config 5 |
| 125 | for more information on patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 126 | .It Cm AllowTcpForwarding |
| 127 | Specifies whether TCP forwarding is permitted. |
| 128 | The default is |
| 129 | .Dq yes . |
| 130 | Note that disabling TCP forwarding does not improve security unless |
| 131 | users are also denied shell access, as they can always install their |
| 132 | own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 133 | .It Cm AllowUsers |
| 134 | This keyword can be followed by a list of user name patterns, separated |
| 135 | by spaces. |
Damien Miller | 5a93add | 2003-01-24 11:34:52 +1100 | [diff] [blame] | 136 | If specified, login is allowed only for user names that |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 137 | match one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 138 | Only user names are valid; a numerical user ID is not recognized. |
| 139 | By default, login is allowed for all users. |
| 140 | If the pattern takes the form USER@HOST then USER and HOST |
| 141 | are separately checked, restricting logins to particular |
| 142 | users from particular hosts. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 143 | The allow/deny directives are processed in the following order: |
| 144 | .Cm DenyUsers , |
| 145 | .Cm AllowUsers , |
| 146 | .Cm DenyGroups , |
| 147 | and finally |
| 148 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 149 | .Pp |
| 150 | See |
| 151 | .Sx PATTERNS |
| 152 | in |
| 153 | .Xr ssh_config 5 |
| 154 | for more information on patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 155 | .It Cm AuthorizedKeysFile |
| 156 | Specifies the file that contains the public keys that can be used |
| 157 | for user authentication. |
| 158 | .Cm AuthorizedKeysFile |
| 159 | may contain tokens of the form %T which are substituted during connection |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 160 | setup. |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 161 | The following tokens are defined: %% is replaced by a literal '%', |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 162 | %h is replaced by the home directory of the user being authenticated, and |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 163 | %u is replaced by the username of that user. |
| 164 | After expansion, |
| 165 | .Cm AuthorizedKeysFile |
| 166 | is taken to be an absolute path or one relative to the user's home |
| 167 | directory. |
| 168 | The default is |
| 169 | .Dq .ssh/authorized_keys . |
| 170 | .It Cm Banner |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 171 | The contents of the specified file are sent to the remote user before |
| 172 | authentication is allowed. |
Damien Miller | 4890e53 | 2007-09-17 11:57:38 +1000 | [diff] [blame] | 173 | If the argument is |
| 174 | .Dq none |
| 175 | then no banner is displayed. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 176 | This option is only available for protocol version 2. |
| 177 | By default, no banner is displayed. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 178 | .It Cm ChallengeResponseAuthentication |
Damien Miller | 9c7bf8d | 2009-08-28 10:27:08 +1000 | [diff] [blame] | 179 | Specifies whether challenge-response authentication is allowed (e.g. via |
| 180 | PAM or though authentication styles supported in |
| 181 | .Xr login.conf 5 ) |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 182 | The default is |
| 183 | .Dq yes . |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 184 | .It Cm ChrootDirectory |
Darren Tucker | b8c884a | 2010-01-08 18:53:43 +1100 | [diff] [blame] | 185 | Specifies the pathname of a directory to |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 186 | .Xr chroot 2 |
| 187 | to after authentication. |
Darren Tucker | b8c884a | 2010-01-08 18:53:43 +1100 | [diff] [blame] | 188 | All components of the pathname must be root-owned directories that are |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 189 | not writable by any other user or group. |
Darren Tucker | 51dbe50 | 2009-06-21 17:56:51 +1000 | [diff] [blame] | 190 | After the chroot, |
| 191 | .Xr sshd 8 |
| 192 | changes the working directory to the user's home directory. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 193 | .Pp |
Darren Tucker | b8c884a | 2010-01-08 18:53:43 +1100 | [diff] [blame] | 194 | The pathname may contain the following tokens that are expanded at runtime once |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 195 | the connecting user has been authenticated: %% is replaced by a literal '%', |
| 196 | %h is replaced by the home directory of the user being authenticated, and |
| 197 | %u is replaced by the username of that user. |
| 198 | .Pp |
| 199 | The |
| 200 | .Cm ChrootDirectory |
| 201 | must contain the necessary files and directories to support the |
Darren Tucker | af501cf | 2009-06-21 17:53:04 +1000 | [diff] [blame] | 202 | user's session. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 203 | For an interactive session this requires at least a shell, typically |
| 204 | .Xr sh 1 , |
| 205 | and basic |
| 206 | .Pa /dev |
| 207 | nodes such as |
| 208 | .Xr null 4 , |
| 209 | .Xr zero 4 , |
| 210 | .Xr stdin 4 , |
| 211 | .Xr stdout 4 , |
| 212 | .Xr stderr 4 , |
| 213 | .Xr arandom 4 |
| 214 | and |
| 215 | .Xr tty 4 |
| 216 | devices. |
| 217 | For file transfer sessions using |
Darren Tucker | f92077f | 2009-06-21 17:56:25 +1000 | [diff] [blame] | 218 | .Dq sftp , |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 219 | no additional configuration of the environment is necessary if the |
Darren Tucker | f92077f | 2009-06-21 17:56:25 +1000 | [diff] [blame] | 220 | in-process sftp server is used, |
| 221 | though sessions which use logging do require |
Darren Tucker | 00fcd71 | 2009-06-21 17:56:00 +1000 | [diff] [blame] | 222 | .Pa /dev/log |
| 223 | inside the chroot directory (see |
| 224 | .Xr sftp-server 8 |
| 225 | for details). |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 226 | .Pp |
| 227 | The default is not to |
| 228 | .Xr chroot 2 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 229 | .It Cm Ciphers |
| 230 | Specifies the ciphers allowed for protocol version 2. |
| 231 | Multiple ciphers must be comma-separated. |
Damien Miller | 05202ff | 2004-06-15 10:30:39 +1000 | [diff] [blame] | 232 | The supported ciphers are |
| 233 | .Dq 3des-cbc , |
| 234 | .Dq aes128-cbc , |
| 235 | .Dq aes192-cbc , |
| 236 | .Dq aes256-cbc , |
| 237 | .Dq aes128-ctr , |
| 238 | .Dq aes192-ctr , |
| 239 | .Dq aes256-ctr , |
Damien Miller | 3710f27 | 2005-05-26 12:19:17 +1000 | [diff] [blame] | 240 | .Dq arcfour128 , |
| 241 | .Dq arcfour256 , |
Damien Miller | 05202ff | 2004-06-15 10:30:39 +1000 | [diff] [blame] | 242 | .Dq arcfour , |
| 243 | .Dq blowfish-cbc , |
| 244 | and |
| 245 | .Dq cast128-cbc . |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 246 | The default is: |
| 247 | .Bd -literal -offset 3n |
Damien Miller | 9aa72ba | 2009-01-28 16:34:00 +1100 | [diff] [blame] | 248 | aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128, |
| 249 | aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc, |
| 250 | aes256-cbc,arcfour |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 251 | .Ed |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 252 | .It Cm ClientAliveCountMax |
Damien Miller | b797770 | 2006-01-03 18:47:31 +1100 | [diff] [blame] | 253 | Sets the number of client alive messages (see below) which may be |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 254 | sent without |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 255 | .Xr sshd 8 |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 256 | receiving any messages back from the client. |
| 257 | If this threshold is reached while client alive messages are being sent, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 258 | sshd will disconnect the client, terminating the session. |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 259 | It is important to note that the use of client alive messages is very |
| 260 | different from |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 261 | .Cm TCPKeepAlive |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 262 | (below). |
| 263 | The client alive messages are sent through the encrypted channel |
| 264 | and therefore will not be spoofable. |
| 265 | The TCP keepalive option enabled by |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 266 | .Cm TCPKeepAlive |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 267 | is spoofable. |
| 268 | The client alive mechanism is valuable when the client or |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 269 | server depend on knowing when a connection has become inactive. |
| 270 | .Pp |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 271 | The default value is 3. |
| 272 | If |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 273 | .Cm ClientAliveInterval |
Damien Miller | b797770 | 2006-01-03 18:47:31 +1100 | [diff] [blame] | 274 | (see below) is set to 15, and |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 275 | .Cm ClientAliveCountMax |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 276 | is left at the default, unresponsive SSH clients |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 277 | will be disconnected after approximately 45 seconds. |
Damien Miller | cc3e8ba | 2006-03-15 12:06:55 +1100 | [diff] [blame] | 278 | This option applies to protocol version 2 only. |
Damien Miller | 1594ad5 | 2005-05-26 12:12:19 +1000 | [diff] [blame] | 279 | .It Cm ClientAliveInterval |
| 280 | Sets a timeout interval in seconds after which if no data has been received |
| 281 | from the client, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 282 | .Xr sshd 8 |
Damien Miller | 1594ad5 | 2005-05-26 12:12:19 +1000 | [diff] [blame] | 283 | will send a message through the encrypted |
| 284 | channel to request a response from the client. |
| 285 | The default |
| 286 | is 0, indicating that these messages will not be sent to the client. |
| 287 | This option applies to protocol version 2 only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 288 | .It Cm Compression |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 289 | Specifies whether compression is allowed, or delayed until |
| 290 | the user has authenticated successfully. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 291 | The argument must be |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 292 | .Dq yes , |
| 293 | .Dq delayed , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 294 | or |
| 295 | .Dq no . |
| 296 | The default is |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 297 | .Dq delayed . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 298 | .It Cm DenyGroups |
| 299 | This keyword can be followed by a list of group name patterns, separated |
| 300 | by spaces. |
| 301 | Login is disallowed for users whose primary group or supplementary |
| 302 | group list matches one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 303 | Only group names are valid; a numerical group ID is not recognized. |
| 304 | By default, login is allowed for all groups. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 305 | The allow/deny directives are processed in the following order: |
| 306 | .Cm DenyUsers , |
| 307 | .Cm AllowUsers , |
| 308 | .Cm DenyGroups , |
| 309 | and finally |
| 310 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 311 | .Pp |
| 312 | See |
| 313 | .Sx PATTERNS |
| 314 | in |
| 315 | .Xr ssh_config 5 |
| 316 | for more information on patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 317 | .It Cm DenyUsers |
| 318 | This keyword can be followed by a list of user name patterns, separated |
| 319 | by spaces. |
| 320 | Login is disallowed for user names that match one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 321 | Only user names are valid; a numerical user ID is not recognized. |
| 322 | By default, login is allowed for all users. |
| 323 | If the pattern takes the form USER@HOST then USER and HOST |
| 324 | are separately checked, restricting logins to particular |
| 325 | users from particular hosts. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 326 | The allow/deny directives are processed in the following order: |
| 327 | .Cm DenyUsers , |
| 328 | .Cm AllowUsers , |
| 329 | .Cm DenyGroups , |
| 330 | and finally |
| 331 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 332 | .Pp |
| 333 | See |
| 334 | .Sx PATTERNS |
| 335 | in |
| 336 | .Xr ssh_config 5 |
| 337 | for more information on patterns. |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 338 | .It Cm ForceCommand |
| 339 | Forces the execution of the command specified by |
| 340 | .Cm ForceCommand , |
Damien Miller | a1b48cc | 2008-03-27 11:02:02 +1100 | [diff] [blame] | 341 | ignoring any command supplied by the client and |
| 342 | .Pa ~/.ssh/rc |
| 343 | if present. |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 344 | The command is invoked by using the user's login shell with the -c option. |
| 345 | This applies to shell, command, or subsystem execution. |
| 346 | It is most useful inside a |
| 347 | .Cm Match |
| 348 | block. |
| 349 | The command originally supplied by the client is available in the |
| 350 | .Ev SSH_ORIGINAL_COMMAND |
| 351 | environment variable. |
Damien Miller | cdb6e65 | 2008-02-10 22:47:24 +1100 | [diff] [blame] | 352 | Specifying a command of |
| 353 | .Dq internal-sftp |
| 354 | will force the use of an in-process sftp server that requires no support |
| 355 | files when used with |
| 356 | .Cm ChrootDirectory . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 357 | .It Cm GatewayPorts |
| 358 | Specifies whether remote hosts are allowed to connect to ports |
| 359 | forwarded for the client. |
| 360 | By default, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 361 | .Xr sshd 8 |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 362 | binds remote port forwardings to the loopback address. |
| 363 | This prevents other remote hosts from connecting to forwarded ports. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 364 | .Cm GatewayPorts |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 365 | can be used to specify that sshd |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 366 | should allow remote port forwardings to bind to non-loopback addresses, thus |
| 367 | allowing other hosts to connect. |
| 368 | The argument may be |
| 369 | .Dq no |
| 370 | to force remote port forwardings to be available to the local host only, |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 371 | .Dq yes |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 372 | to force remote port forwardings to bind to the wildcard address, or |
| 373 | .Dq clientspecified |
| 374 | to allow the client to select the address to which the forwarding is bound. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 375 | The default is |
| 376 | .Dq no . |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 377 | .It Cm GSSAPIAuthentication |
Damien Miller | 9b7b03b | 2003-09-02 22:57:05 +1000 | [diff] [blame] | 378 | Specifies whether user authentication based on GSSAPI is allowed. |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 379 | The default is |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 380 | .Dq no . |
| 381 | Note that this option applies to protocol version 2 only. |
| 382 | .It Cm GSSAPICleanupCredentials |
| 383 | Specifies whether to automatically destroy the user's credentials cache |
| 384 | on logout. |
| 385 | The default is |
| 386 | .Dq yes . |
| 387 | Note that this option applies to protocol version 2 only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 388 | .It Cm HostbasedAuthentication |
| 389 | Specifies whether rhosts or /etc/hosts.equiv authentication together |
| 390 | with successful public key client host authentication is allowed |
Damien Miller | 1faa713 | 2006-03-15 11:55:31 +1100 | [diff] [blame] | 391 | (host-based authentication). |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 392 | This option is similar to |
| 393 | .Cm RhostsRSAAuthentication |
| 394 | and applies to protocol version 2 only. |
| 395 | The default is |
| 396 | .Dq no . |
Damien Miller | b594f38 | 2006-08-30 11:06:34 +1000 | [diff] [blame] | 397 | .It Cm HostbasedUsesNameFromPacketOnly |
| 398 | Specifies whether or not the server will attempt to perform a reverse |
| 399 | name lookup when matching the name in the |
| 400 | .Pa ~/.shosts , |
| 401 | .Pa ~/.rhosts , |
| 402 | and |
| 403 | .Pa /etc/hosts.equiv |
| 404 | files during |
| 405 | .Cm HostbasedAuthentication . |
| 406 | A setting of |
| 407 | .Dq yes |
| 408 | means that |
| 409 | .Xr sshd 8 |
| 410 | uses the name supplied by the client rather than |
| 411 | attempting to resolve the name from the TCP connection itself. |
| 412 | The default is |
| 413 | .Dq no . |
Damien Miller | 0a80ca1 | 2010-02-27 07:55:05 +1100 | [diff] [blame] | 414 | .It Cm HostCertificate |
| 415 | Specifies a file containing a public host certificate. |
| 416 | The certificate's public key must match a private host key already specified |
| 417 | by |
| 418 | .Cm HostKey . |
| 419 | The default behaviour of |
| 420 | .Xr sshd 8 |
| 421 | is not to load any certificates. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 422 | .It Cm HostKey |
| 423 | Specifies a file containing a private host key |
| 424 | used by SSH. |
| 425 | The default is |
| 426 | .Pa /etc/ssh/ssh_host_key |
| 427 | for protocol version 1, and |
| 428 | .Pa /etc/ssh/ssh_host_rsa_key |
| 429 | and |
| 430 | .Pa /etc/ssh/ssh_host_dsa_key |
| 431 | for protocol version 2. |
| 432 | Note that |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 433 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 434 | will refuse to use a file if it is group/world-accessible. |
| 435 | It is possible to have multiple host key files. |
| 436 | .Dq rsa1 |
| 437 | keys are used for version 1 and |
| 438 | .Dq dsa |
| 439 | or |
| 440 | .Dq rsa |
| 441 | are used for version 2 of the SSH protocol. |
| 442 | .It Cm IgnoreRhosts |
| 443 | Specifies that |
| 444 | .Pa .rhosts |
| 445 | and |
| 446 | .Pa .shosts |
| 447 | files will not be used in |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 448 | .Cm RhostsRSAAuthentication |
| 449 | or |
| 450 | .Cm HostbasedAuthentication . |
| 451 | .Pp |
| 452 | .Pa /etc/hosts.equiv |
| 453 | and |
| 454 | .Pa /etc/shosts.equiv |
| 455 | are still used. |
| 456 | The default is |
| 457 | .Dq yes . |
| 458 | .It Cm IgnoreUserKnownHosts |
| 459 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 460 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 461 | should ignore the user's |
Damien Miller | 167ea5d | 2005-05-26 12:04:02 +1000 | [diff] [blame] | 462 | .Pa ~/.ssh/known_hosts |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 463 | during |
| 464 | .Cm RhostsRSAAuthentication |
| 465 | or |
| 466 | .Cm HostbasedAuthentication . |
| 467 | The default is |
| 468 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 469 | .It Cm KerberosAuthentication |
Damien Miller | 1a0c0b9 | 2003-09-02 22:51:17 +1000 | [diff] [blame] | 470 | Specifies whether the password provided by the user for |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 471 | .Cm PasswordAuthentication |
Damien Miller | 1a0c0b9 | 2003-09-02 22:51:17 +1000 | [diff] [blame] | 472 | will be validated through the Kerberos KDC. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 473 | To use this option, the server needs a |
| 474 | Kerberos servtab which allows the verification of the KDC's identity. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 475 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 476 | .Dq no . |
Damien Miller | 8448e66 | 2004-03-08 23:13:15 +1100 | [diff] [blame] | 477 | .It Cm KerberosGetAFSToken |
Darren Tucker | e2dd2d5 | 2005-10-03 18:19:06 +1000 | [diff] [blame] | 478 | If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire |
Damien Miller | 8448e66 | 2004-03-08 23:13:15 +1100 | [diff] [blame] | 479 | an AFS token before accessing the user's home directory. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 480 | The default is |
Damien Miller | 8448e66 | 2004-03-08 23:13:15 +1100 | [diff] [blame] | 481 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 482 | .It Cm KerberosOrLocalPasswd |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 483 | If password authentication through Kerberos fails then |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 484 | the password will be validated via any additional local mechanism |
| 485 | such as |
| 486 | .Pa /etc/passwd . |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 487 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 488 | .Dq yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 489 | .It Cm KerberosTicketCleanup |
| 490 | Specifies whether to automatically destroy the user's ticket cache |
| 491 | file on logout. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 492 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 493 | .Dq yes . |
| 494 | .It Cm KeyRegenerationInterval |
| 495 | In protocol version 1, the ephemeral server key is automatically regenerated |
| 496 | after this many seconds (if it has been used). |
| 497 | The purpose of regeneration is to prevent |
| 498 | decrypting captured sessions by later breaking into the machine and |
| 499 | stealing the keys. |
| 500 | The key is never stored anywhere. |
| 501 | If the value is 0, the key is never regenerated. |
| 502 | The default is 3600 (seconds). |
| 503 | .It Cm ListenAddress |
| 504 | Specifies the local addresses |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 505 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 506 | should listen on. |
| 507 | The following forms may be used: |
| 508 | .Pp |
| 509 | .Bl -item -offset indent -compact |
| 510 | .It |
| 511 | .Cm ListenAddress |
| 512 | .Sm off |
| 513 | .Ar host No | Ar IPv4_addr No | Ar IPv6_addr |
| 514 | .Sm on |
| 515 | .It |
| 516 | .Cm ListenAddress |
| 517 | .Sm off |
| 518 | .Ar host No | Ar IPv4_addr No : Ar port |
| 519 | .Sm on |
| 520 | .It |
| 521 | .Cm ListenAddress |
| 522 | .Sm off |
| 523 | .Oo |
| 524 | .Ar host No | Ar IPv6_addr Oc : Ar port |
| 525 | .Sm on |
| 526 | .El |
| 527 | .Pp |
| 528 | If |
| 529 | .Ar port |
| 530 | is not specified, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 531 | sshd will listen on the address and all prior |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 532 | .Cm Port |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 533 | options specified. |
| 534 | The default is to listen on all local addresses. |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 535 | Multiple |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 536 | .Cm ListenAddress |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 537 | options are permitted. |
| 538 | Additionally, any |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 539 | .Cm Port |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 540 | options must precede this option for non-port qualified addresses. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 541 | .It Cm LoginGraceTime |
| 542 | The server disconnects after this time if the user has not |
| 543 | successfully logged in. |
| 544 | If the value is 0, there is no time limit. |
Damien Miller | c134863 | 2002-09-05 14:35:14 +1000 | [diff] [blame] | 545 | The default is 120 seconds. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 546 | .It Cm LogLevel |
| 547 | Gives the verbosity level that is used when logging messages from |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 548 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 549 | The possible values are: |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 550 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 551 | The default is INFO. |
| 552 | DEBUG and DEBUG1 are equivalent. |
| 553 | DEBUG2 and DEBUG3 each specify higher levels of debugging output. |
| 554 | Logging with a DEBUG level violates the privacy of users and is not recommended. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 555 | .It Cm MACs |
| 556 | Specifies the available MAC (message authentication code) algorithms. |
| 557 | The MAC algorithm is used in protocol version 2 |
| 558 | for data integrity protection. |
| 559 | Multiple algorithms must be comma-separated. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 560 | The default is: |
Damien Miller | 22b7b49 | 2007-06-11 14:07:12 +1000 | [diff] [blame] | 561 | .Bd -literal -offset indent |
| 562 | hmac-md5,hmac-sha1,umac-64@openssh.com, |
| 563 | hmac-ripemd160,hmac-sha1-96,hmac-md5-96 |
| 564 | .Ed |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 565 | .It Cm Match |
Damien Miller | d04f357 | 2006-07-24 13:46:50 +1000 | [diff] [blame] | 566 | Introduces a conditional block. |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 567 | If all of the criteria on the |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 568 | .Cm Match |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 569 | line are satisfied, the keywords on the following lines override those |
| 570 | set in the global section of the config file, until either another |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 571 | .Cm Match |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 572 | line or the end of the file. |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 573 | .Pp |
Damien Miller | d04f357 | 2006-07-24 13:46:50 +1000 | [diff] [blame] | 574 | The arguments to |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 575 | .Cm Match |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 576 | are one or more criteria-pattern pairs. |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 577 | The available criteria are |
| 578 | .Cm User , |
Damien Miller | 565ca3f | 2006-08-19 00:23:15 +1000 | [diff] [blame] | 579 | .Cm Group , |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 580 | .Cm Host , |
| 581 | and |
| 582 | .Cm Address . |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 583 | The match patterns may consist of single entries or comma-separated |
| 584 | lists and may use the wildcard and negation operators described in the |
Darren Tucker | b06cc4a | 2008-06-10 22:59:53 +1000 | [diff] [blame] | 585 | .Sx PATTERNS |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 586 | section of |
Darren Tucker | b06cc4a | 2008-06-10 22:59:53 +1000 | [diff] [blame] | 587 | .Xr ssh_config 5 . |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 588 | .Pp |
| 589 | The patterns in an |
| 590 | .Cm Address |
| 591 | criteria may additionally contain addresses to match in CIDR |
Darren Tucker | 6a2a400 | 2008-06-10 23:03:04 +1000 | [diff] [blame] | 592 | address/masklen format, e.g.\& |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 593 | .Dq 192.0.2.0/24 |
| 594 | or |
| 595 | .Dq 3ffe:ffff::/32 . |
| 596 | Note that the mask length provided must be consistent with the address - |
| 597 | it is an error to specify a mask length that is too long for the address |
Darren Tucker | 6a2a400 | 2008-06-10 23:03:04 +1000 | [diff] [blame] | 598 | or one with bits set in this host portion of the address. |
| 599 | For example, |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 600 | .Dq 192.0.2.0/33 |
| 601 | and |
Darren Tucker | 6a2a400 | 2008-06-10 23:03:04 +1000 | [diff] [blame] | 602 | .Dq 192.0.2.0/8 |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 603 | respectively. |
| 604 | .Pp |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 605 | Only a subset of keywords may be used on the lines following a |
| 606 | .Cm Match |
| 607 | keyword. |
| 608 | Available keywords are |
Damien Miller | 1781901 | 2009-01-28 16:20:17 +1100 | [diff] [blame] | 609 | .Cm AllowAgentForwarding , |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 610 | .Cm AllowTcpForwarding , |
Darren Tucker | 1629c07 | 2007-02-19 22:25:37 +1100 | [diff] [blame] | 611 | .Cm Banner , |
Damien Miller | 797e3d1 | 2008-05-19 14:27:42 +1000 | [diff] [blame] | 612 | .Cm ChrootDirectory , |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 613 | .Cm ForceCommand , |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 614 | .Cm GatewayPorts , |
Damien Miller | 25434de | 2008-05-19 14:29:08 +1000 | [diff] [blame] | 615 | .Cm GSSAPIAuthentication , |
| 616 | .Cm HostbasedAuthentication , |
Darren Tucker | 1d75f22 | 2007-03-01 21:31:28 +1100 | [diff] [blame] | 617 | .Cm KbdInteractiveAuthentication , |
Damien Miller | 5737e36 | 2007-03-06 21:21:18 +1100 | [diff] [blame] | 618 | .Cm KerberosAuthentication , |
Damien Miller | 307c1d1 | 2008-06-16 07:56:20 +1000 | [diff] [blame] | 619 | .Cm MaxAuthTries , |
Damien Miller | c62a5af | 2008-06-16 07:55:46 +1000 | [diff] [blame] | 620 | .Cm MaxSessions , |
Darren Tucker | 1629c07 | 2007-02-19 22:25:37 +1100 | [diff] [blame] | 621 | .Cm PasswordAuthentication , |
Damien Miller | 51bde60 | 2008-11-03 19:23:10 +1100 | [diff] [blame] | 622 | .Cm PermitEmptyPasswords , |
Damien Miller | d1de995 | 2006-07-24 14:05:48 +1000 | [diff] [blame] | 623 | .Cm PermitOpen , |
Darren Tucker | 15f9427 | 2008-01-01 20:36:56 +1100 | [diff] [blame] | 624 | .Cm PermitRootLogin , |
Darren Tucker | 1477ea1 | 2009-10-07 08:36:05 +1100 | [diff] [blame] | 625 | .Cm PubkeyAuthentication , |
Darren Tucker | 1629c07 | 2007-02-19 22:25:37 +1100 | [diff] [blame] | 626 | .Cm RhostsRSAAuthentication , |
| 627 | .Cm RSAAuthentication , |
Damien Miller | d1de995 | 2006-07-24 14:05:48 +1000 | [diff] [blame] | 628 | .Cm X11DisplayOffset , |
Damien Miller | 1991384 | 2009-02-23 10:53:58 +1100 | [diff] [blame] | 629 | .Cm X11Forwarding |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 630 | and |
Damien Miller | 0296ae8 | 2009-02-23 11:00:24 +1100 | [diff] [blame] | 631 | .Cm X11UseLocalHost . |
Darren Tucker | 89413db | 2004-05-24 10:36:23 +1000 | [diff] [blame] | 632 | .It Cm MaxAuthTries |
| 633 | Specifies the maximum number of authentication attempts permitted per |
Damien Miller | 26213e5 | 2004-06-30 22:39:34 +1000 | [diff] [blame] | 634 | connection. |
| 635 | Once the number of failures reaches half this value, |
| 636 | additional failures are logged. |
| 637 | The default is 6. |
Damien Miller | 7207f64 | 2008-05-19 15:34:50 +1000 | [diff] [blame] | 638 | .It Cm MaxSessions |
| 639 | Specifies the maximum number of open sessions permitted per network connection. |
| 640 | The default is 10. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 641 | .It Cm MaxStartups |
| 642 | Specifies the maximum number of concurrent unauthenticated connections to the |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 643 | SSH daemon. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 644 | Additional connections will be dropped until authentication succeeds or the |
| 645 | .Cm LoginGraceTime |
| 646 | expires for a connection. |
| 647 | The default is 10. |
| 648 | .Pp |
| 649 | Alternatively, random early drop can be enabled by specifying |
| 650 | the three colon separated values |
| 651 | .Dq start:rate:full |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 652 | (e.g. "10:30:60"). |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 653 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 654 | will refuse connection attempts with a probability of |
| 655 | .Dq rate/100 |
| 656 | (30%) |
| 657 | if there are currently |
| 658 | .Dq start |
| 659 | (10) |
| 660 | unauthenticated connections. |
| 661 | The probability increases linearly and all connection attempts |
| 662 | are refused if the number of unauthenticated connections reaches |
| 663 | .Dq full |
| 664 | (60). |
| 665 | .It Cm PasswordAuthentication |
| 666 | Specifies whether password authentication is allowed. |
| 667 | The default is |
| 668 | .Dq yes . |
| 669 | .It Cm PermitEmptyPasswords |
| 670 | When password authentication is allowed, it specifies whether the |
| 671 | server allows login to accounts with empty password strings. |
| 672 | The default is |
| 673 | .Dq no . |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 674 | .It Cm PermitOpen |
| 675 | Specifies the destinations to which TCP port forwarding is permitted. |
| 676 | The forwarding specification must be one of the following forms: |
| 677 | .Pp |
| 678 | .Bl -item -offset indent -compact |
| 679 | .It |
| 680 | .Cm PermitOpen |
| 681 | .Sm off |
| 682 | .Ar host : port |
| 683 | .Sm on |
| 684 | .It |
| 685 | .Cm PermitOpen |
| 686 | .Sm off |
| 687 | .Ar IPv4_addr : port |
| 688 | .Sm on |
| 689 | .It |
| 690 | .Cm PermitOpen |
| 691 | .Sm off |
| 692 | .Ar \&[ IPv6_addr \&] : port |
| 693 | .Sm on |
| 694 | .El |
| 695 | .Pp |
Damien Miller | a765cf4 | 2006-07-24 14:08:13 +1000 | [diff] [blame] | 696 | Multiple forwards may be specified by separating them with whitespace. |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 697 | An argument of |
| 698 | .Dq any |
| 699 | can be used to remove all restrictions and permit any forwarding requests. |
Damien Miller | 65bc2c4 | 2006-07-24 14:04:16 +1000 | [diff] [blame] | 700 | By default all port forwarding requests are permitted. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 701 | .It Cm PermitRootLogin |
Darren Tucker | b350901 | 2005-01-20 11:01:46 +1100 | [diff] [blame] | 702 | Specifies whether root can log in using |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 703 | .Xr ssh 1 . |
| 704 | The argument must be |
| 705 | .Dq yes , |
| 706 | .Dq without-password , |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 707 | .Dq forced-commands-only , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 708 | or |
| 709 | .Dq no . |
| 710 | The default is |
| 711 | .Dq yes . |
| 712 | .Pp |
| 713 | If this option is set to |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 714 | .Dq without-password , |
Darren Tucker | 9dca099 | 2005-02-01 19:16:45 +1100 | [diff] [blame] | 715 | password authentication is disabled for root. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 716 | .Pp |
| 717 | If this option is set to |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 718 | .Dq forced-commands-only , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 719 | root login with public key authentication will be allowed, |
| 720 | but only if the |
| 721 | .Ar command |
| 722 | option has been specified |
| 723 | (which may be useful for taking remote backups even if root login is |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 724 | normally not allowed). |
| 725 | All other authentication methods are disabled for root. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 726 | .Pp |
| 727 | If this option is set to |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 728 | .Dq no , |
Darren Tucker | b350901 | 2005-01-20 11:01:46 +1100 | [diff] [blame] | 729 | root is not allowed to log in. |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 730 | .It Cm PermitTunnel |
| 731 | Specifies whether |
| 732 | .Xr tun 4 |
| 733 | device forwarding is allowed. |
Damien Miller | 7b58e80 | 2005-12-13 19:33:19 +1100 | [diff] [blame] | 734 | The argument must be |
| 735 | .Dq yes , |
Damien Miller | 991dba4 | 2006-07-10 20:16:27 +1000 | [diff] [blame] | 736 | .Dq point-to-point |
| 737 | (layer 3), |
| 738 | .Dq ethernet |
| 739 | (layer 2), or |
Damien Miller | 7b58e80 | 2005-12-13 19:33:19 +1100 | [diff] [blame] | 740 | .Dq no . |
Damien Miller | 991dba4 | 2006-07-10 20:16:27 +1000 | [diff] [blame] | 741 | Specifying |
| 742 | .Dq yes |
| 743 | permits both |
| 744 | .Dq point-to-point |
| 745 | and |
| 746 | .Dq ethernet . |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 747 | The default is |
| 748 | .Dq no . |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 749 | .It Cm PermitUserEnvironment |
| 750 | Specifies whether |
| 751 | .Pa ~/.ssh/environment |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 752 | and |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 753 | .Cm environment= |
| 754 | options in |
| 755 | .Pa ~/.ssh/authorized_keys |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 756 | are processed by |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 757 | .Xr sshd 8 . |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 758 | The default is |
| 759 | .Dq no . |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 760 | Enabling environment processing may enable users to bypass access |
| 761 | restrictions in some configurations using mechanisms such as |
| 762 | .Ev LD_PRELOAD . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 763 | .It Cm PidFile |
Ben Lindstrom | 959de99 | 2002-06-23 00:35:25 +0000 | [diff] [blame] | 764 | Specifies the file that contains the process ID of the |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 765 | SSH daemon. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 766 | The default is |
| 767 | .Pa /var/run/sshd.pid . |
| 768 | .It Cm Port |
| 769 | Specifies the port number that |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 770 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 771 | listens on. |
| 772 | The default is 22. |
| 773 | Multiple options of this type are permitted. |
| 774 | See also |
| 775 | .Cm ListenAddress . |
| 776 | .It Cm PrintLastLog |
| 777 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 778 | .Xr sshd 8 |
Darren Tucker | 7cc5c23 | 2004-11-05 20:06:59 +1100 | [diff] [blame] | 779 | should print the date and time of the last user login when a user logs |
| 780 | in interactively. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 781 | The default is |
| 782 | .Dq yes . |
| 783 | .It Cm PrintMotd |
| 784 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 785 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 786 | should print |
| 787 | .Pa /etc/motd |
| 788 | when a user logs in interactively. |
| 789 | (On some systems it is also printed by the shell, |
| 790 | .Pa /etc/profile , |
| 791 | or equivalent.) |
| 792 | The default is |
| 793 | .Dq yes . |
| 794 | .It Cm Protocol |
| 795 | Specifies the protocol versions |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 796 | .Xr sshd 8 |
Ben Lindstrom | 9c44554 | 2002-07-11 03:59:18 +0000 | [diff] [blame] | 797 | supports. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 798 | The possible values are |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 799 | .Sq 1 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 800 | and |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 801 | .Sq 2 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 802 | Multiple versions must be comma-separated. |
| 803 | The default is |
Darren Tucker | 7a4a765 | 2009-10-11 21:51:40 +1100 | [diff] [blame] | 804 | .Sq 2 . |
Ben Lindstrom | 9c44554 | 2002-07-11 03:59:18 +0000 | [diff] [blame] | 805 | Note that the order of the protocol list does not indicate preference, |
| 806 | because the client selects among multiple protocol versions offered |
| 807 | by the server. |
| 808 | Specifying |
| 809 | .Dq 2,1 |
| 810 | is identical to |
| 811 | .Dq 1,2 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 812 | .It Cm PubkeyAuthentication |
| 813 | Specifies whether public key authentication is allowed. |
| 814 | The default is |
| 815 | .Dq yes . |
| 816 | Note that this option applies to protocol version 2 only. |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 817 | .It Cm RevokedKeys |
| 818 | Specifies a list of revoked public keys. |
| 819 | Keys listed in this file will be refused for public key authentication. |
| 820 | Note that if this file is not readable, then public key authentication will |
| 821 | be refused for all users. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 822 | .It Cm RhostsRSAAuthentication |
| 823 | Specifies whether rhosts or /etc/hosts.equiv authentication together |
| 824 | with successful RSA host authentication is allowed. |
| 825 | The default is |
| 826 | .Dq no . |
| 827 | This option applies to protocol version 1 only. |
| 828 | .It Cm RSAAuthentication |
| 829 | Specifies whether pure RSA authentication is allowed. |
| 830 | The default is |
| 831 | .Dq yes . |
| 832 | This option applies to protocol version 1 only. |
| 833 | .It Cm ServerKeyBits |
| 834 | Defines the number of bits in the ephemeral protocol version 1 server key. |
Darren Tucker | 7499b0c | 2008-07-02 22:35:43 +1000 | [diff] [blame] | 835 | The minimum value is 512, and the default is 1024. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 836 | .It Cm StrictModes |
| 837 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 838 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 839 | should check file modes and ownership of the |
| 840 | user's files and home directory before accepting login. |
| 841 | This is normally desirable because novices sometimes accidentally leave their |
| 842 | directory or files world-writable. |
| 843 | The default is |
| 844 | .Dq yes . |
Darren Tucker | f788a91 | 2010-01-08 17:06:47 +1100 | [diff] [blame] | 845 | Note that this does not apply to |
| 846 | .Cm ChrootDirectory , |
| 847 | whose permissions and ownership are checked unconditionally. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 848 | .It Cm Subsystem |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 849 | Configures an external subsystem (e.g. file transfer daemon). |
Damien Miller | 917f9b6 | 2006-07-10 20:36:47 +1000 | [diff] [blame] | 850 | Arguments should be a subsystem name and a command (with optional arguments) |
| 851 | to execute upon subsystem request. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 852 | .Pp |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 853 | The command |
| 854 | .Xr sftp-server 8 |
| 855 | implements the |
| 856 | .Dq sftp |
| 857 | file transfer subsystem. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 858 | .Pp |
| 859 | Alternately the name |
| 860 | .Dq internal-sftp |
| 861 | implements an in-process |
| 862 | .Dq sftp |
| 863 | server. |
| 864 | This may simplify configurations using |
| 865 | .Cm ChrootDirectory |
| 866 | to force a different filesystem root on clients. |
| 867 | .Pp |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 868 | By default no subsystems are defined. |
| 869 | Note that this option applies to protocol version 2 only. |
| 870 | .It Cm SyslogFacility |
| 871 | Gives the facility code that is used when logging messages from |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 872 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 873 | The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, |
| 874 | LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. |
| 875 | The default is AUTH. |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 876 | .It Cm TCPKeepAlive |
| 877 | Specifies whether the system should send TCP keepalive messages to the |
| 878 | other side. |
| 879 | If they are sent, death of the connection or crash of one |
| 880 | of the machines will be properly noticed. |
| 881 | However, this means that |
| 882 | connections will die if the route is down temporarily, and some people |
| 883 | find it annoying. |
| 884 | On the other hand, if TCP keepalives are not sent, |
| 885 | sessions may hang indefinitely on the server, leaving |
| 886 | .Dq ghost |
| 887 | users and consuming server resources. |
| 888 | .Pp |
| 889 | The default is |
| 890 | .Dq yes |
| 891 | (to send TCP keepalive messages), and the server will notice |
| 892 | if the network goes down or the client host crashes. |
| 893 | This avoids infinitely hanging sessions. |
| 894 | .Pp |
| 895 | To disable TCP keepalive messages, the value should be set to |
| 896 | .Dq no . |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 897 | .It Cm TrustedUserCAKeys |
| 898 | Specifies a file containing public keys of certificate authorities that are |
Damien Miller | c6db99e | 2010-03-05 10:41:45 +1100 | [diff] [blame] | 899 | trusted to sign user certificates for authentication. |
Damien Miller | 72b3382 | 2010-03-05 07:39:01 +1100 | [diff] [blame] | 900 | Keys are listed one per line; empty lines and comments starting with |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 901 | .Ql # |
| 902 | are allowed. |
| 903 | If a certificate is presented for authentication and has its signing CA key |
| 904 | listed in this file, then it may be used for authentication for any user |
| 905 | listed in the certificate's principals list. |
| 906 | Note that certificates that lack a list of principals will not be permitted |
| 907 | for authentication using |
| 908 | .Cm TrustedUserCAKeys . |
Damien Miller | 72b3382 | 2010-03-05 07:39:01 +1100 | [diff] [blame] | 909 | For more details on certificates, see the |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 910 | .Sx CERTIFICATES |
| 911 | section in |
| 912 | .Xr ssh-keygen 1 . |
Damien Miller | 3a961dc | 2003-06-03 10:25:48 +1000 | [diff] [blame] | 913 | .It Cm UseDNS |
| 914 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 915 | .Xr sshd 8 |
Darren Tucker | 83d5a98 | 2005-03-31 21:33:50 +1000 | [diff] [blame] | 916 | should look up the remote host name and check that |
Damien Miller | 3a961dc | 2003-06-03 10:25:48 +1000 | [diff] [blame] | 917 | the resolved host name for the remote IP address maps back to the |
| 918 | very same IP address. |
| 919 | The default is |
| 920 | .Dq yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 921 | .It Cm UseLogin |
| 922 | Specifies whether |
| 923 | .Xr login 1 |
| 924 | is used for interactive login sessions. |
| 925 | The default is |
| 926 | .Dq no . |
| 927 | Note that |
| 928 | .Xr login 1 |
| 929 | is never used for remote command execution. |
| 930 | Note also, that if this is enabled, |
| 931 | .Cm X11Forwarding |
| 932 | will be disabled because |
| 933 | .Xr login 1 |
| 934 | does not know how to handle |
| 935 | .Xr xauth 1 |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 936 | cookies. |
| 937 | If |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 938 | .Cm UsePrivilegeSeparation |
| 939 | is specified, it will be disabled after authentication. |
Damien Miller | 2e193e2 | 2003-05-14 15:13:03 +1000 | [diff] [blame] | 940 | .It Cm UsePAM |
Darren Tucker | 1dcff9a | 2004-05-13 16:51:40 +1000 | [diff] [blame] | 941 | Enables the Pluggable Authentication Module interface. |
| 942 | If set to |
| 943 | .Dq yes |
| 944 | this will enable PAM authentication using |
| 945 | .Cm ChallengeResponseAuthentication |
Darren Tucker | a4904f7 | 2006-02-23 21:35:30 +1100 | [diff] [blame] | 946 | and |
| 947 | .Cm PasswordAuthentication |
| 948 | in addition to PAM account and session module processing for all |
| 949 | authentication types. |
Darren Tucker | 1dcff9a | 2004-05-13 16:51:40 +1000 | [diff] [blame] | 950 | .Pp |
| 951 | Because PAM challenge-response authentication usually serves an equivalent |
| 952 | role to password authentication, you should disable either |
| 953 | .Cm PasswordAuthentication |
| 954 | or |
| 955 | .Cm ChallengeResponseAuthentication. |
| 956 | .Pp |
| 957 | If |
| 958 | .Cm UsePAM |
| 959 | is enabled, you will not be able to run |
| 960 | .Xr sshd 8 |
| 961 | as a non-root user. |
| 962 | The default is |
Darren Tucker | 6c0c070 | 2003-10-09 14:13:53 +1000 | [diff] [blame] | 963 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 964 | .It Cm UsePrivilegeSeparation |
| 965 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 966 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 967 | separates privileges by creating an unprivileged child process |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 968 | to deal with incoming network traffic. |
| 969 | After successful authentication, another process will be created that has |
| 970 | the privilege of the authenticated user. |
| 971 | The goal of privilege separation is to prevent privilege |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 972 | escalation by containing any corruption within the unprivileged processes. |
| 973 | The default is |
| 974 | .Dq yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 975 | .It Cm X11DisplayOffset |
| 976 | Specifies the first display number available for |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 977 | .Xr sshd 8 Ns 's |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 978 | X11 forwarding. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 979 | This prevents sshd from interfering with real X11 servers. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 980 | The default is 10. |
| 981 | .It Cm X11Forwarding |
| 982 | Specifies whether X11 forwarding is permitted. |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 983 | The argument must be |
| 984 | .Dq yes |
| 985 | or |
| 986 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 987 | The default is |
| 988 | .Dq no . |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 989 | .Pp |
| 990 | When X11 forwarding is enabled, there may be additional exposure to |
| 991 | the server and to client displays if the |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 992 | .Xr sshd 8 |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 993 | proxy display is configured to listen on the wildcard address (see |
| 994 | .Cm X11UseLocalhost |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 995 | below), though this is not the default. |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 996 | Additionally, the authentication spoofing and authentication data |
| 997 | verification and substitution occur on the client side. |
| 998 | The security risk of using X11 forwarding is that the client's X11 |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 999 | display server may be exposed to attack when the SSH client requests |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1000 | forwarding (see the warnings for |
| 1001 | .Cm ForwardX11 |
| 1002 | in |
Damien Miller | f1ce505 | 2003-06-11 22:04:39 +1000 | [diff] [blame] | 1003 | .Xr ssh_config 5 ) . |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1004 | A system administrator may have a stance in which they want to |
| 1005 | protect clients that may expose themselves to attack by unwittingly |
| 1006 | requesting X11 forwarding, which can warrant a |
| 1007 | .Dq no |
| 1008 | setting. |
| 1009 | .Pp |
| 1010 | Note that disabling X11 forwarding does not prevent users from |
| 1011 | forwarding X11 traffic, as users can always install their own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1012 | X11 forwarding is automatically disabled if |
| 1013 | .Cm UseLogin |
| 1014 | is enabled. |
| 1015 | .It Cm X11UseLocalhost |
| 1016 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1017 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1018 | should bind the X11 forwarding server to the loopback address or to |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 1019 | the wildcard address. |
| 1020 | By default, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1021 | sshd binds the forwarding server to the loopback address and sets the |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1022 | hostname part of the |
| 1023 | .Ev DISPLAY |
| 1024 | environment variable to |
| 1025 | .Dq localhost . |
Ben Lindstrom | 15b6120 | 2002-08-20 18:44:24 +0000 | [diff] [blame] | 1026 | This prevents remote hosts from connecting to the proxy display. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1027 | However, some older X11 clients may not function with this |
| 1028 | configuration. |
| 1029 | .Cm X11UseLocalhost |
| 1030 | may be set to |
| 1031 | .Dq no |
| 1032 | to specify that the forwarding server should be bound to the wildcard |
| 1033 | address. |
| 1034 | The argument must be |
| 1035 | .Dq yes |
| 1036 | or |
| 1037 | .Dq no . |
| 1038 | The default is |
| 1039 | .Dq yes . |
| 1040 | .It Cm XAuthLocation |
Damien Miller | 05913ba | 2002-09-04 16:51:03 +1000 | [diff] [blame] | 1041 | Specifies the full pathname of the |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1042 | .Xr xauth 1 |
| 1043 | program. |
| 1044 | The default is |
| 1045 | .Pa /usr/X11R6/bin/xauth . |
| 1046 | .El |
Damien Miller | e3beba2 | 2006-03-15 11:59:25 +1100 | [diff] [blame] | 1047 | .Sh TIME FORMATS |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1048 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1049 | command-line arguments and configuration file options that specify time |
| 1050 | may be expressed using a sequence of the form: |
| 1051 | .Sm off |
Ben Lindstrom | 1f8cf4f | 2002-08-20 18:43:27 +0000 | [diff] [blame] | 1052 | .Ar time Op Ar qualifier , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1053 | .Sm on |
| 1054 | where |
| 1055 | .Ar time |
| 1056 | is a positive integer value and |
| 1057 | .Ar qualifier |
| 1058 | is one of the following: |
| 1059 | .Pp |
| 1060 | .Bl -tag -width Ds -compact -offset indent |
Damien Miller | 393821a | 2006-07-24 14:04:53 +1000 | [diff] [blame] | 1061 | .It Aq Cm none |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1062 | seconds |
| 1063 | .It Cm s | Cm S |
| 1064 | seconds |
| 1065 | .It Cm m | Cm M |
| 1066 | minutes |
| 1067 | .It Cm h | Cm H |
| 1068 | hours |
| 1069 | .It Cm d | Cm D |
| 1070 | days |
| 1071 | .It Cm w | Cm W |
| 1072 | weeks |
| 1073 | .El |
| 1074 | .Pp |
| 1075 | Each member of the sequence is added together to calculate |
| 1076 | the total time value. |
| 1077 | .Pp |
| 1078 | Time format examples: |
| 1079 | .Pp |
| 1080 | .Bl -tag -width Ds -compact -offset indent |
| 1081 | .It 600 |
| 1082 | 600 seconds (10 minutes) |
| 1083 | .It 10m |
| 1084 | 10 minutes |
| 1085 | .It 1h30m |
| 1086 | 1 hour 30 minutes (90 minutes) |
| 1087 | .El |
| 1088 | .Sh FILES |
| 1089 | .Bl -tag -width Ds |
| 1090 | .It Pa /etc/ssh/sshd_config |
| 1091 | Contains configuration data for |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1092 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1093 | This file should be writable by root only, but it is recommended |
| 1094 | (though not necessary) that it be world-readable. |
| 1095 | .El |
Damien Miller | f1ce505 | 2003-06-11 22:04:39 +1000 | [diff] [blame] | 1096 | .Sh SEE ALSO |
| 1097 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1098 | .Sh AUTHORS |
| 1099 | OpenSSH is a derivative of the original and free |
| 1100 | ssh 1.2.12 release by Tatu Ylonen. |
| 1101 | Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, |
| 1102 | Theo de Raadt and Dug Song |
| 1103 | removed many bugs, re-added newer features and |
| 1104 | created OpenSSH. |
| 1105 | Markus Friedl contributed the support for SSH |
| 1106 | protocol versions 1.5 and 2.0. |
| 1107 | Niels Provos and Markus Friedl contributed support |
| 1108 | for privilege separation. |