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 | 306d118 | 2006-03-15 12:05:59 +1100 | [diff] [blame^] | 37 | .\" $OpenBSD: sshd_config.5,v 1.56 2006/03/13 10:14:29 dtucker Exp $ |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 38 | .Dd September 25, 1999 |
| 39 | .Dt SSHD_CONFIG 5 |
| 40 | .Os |
| 41 | .Sh NAME |
| 42 | .Nm sshd_config |
| 43 | .Nd OpenSSH SSH daemon configuration file |
| 44 | .Sh SYNOPSIS |
| 45 | .Bl -tag -width Ds -compact |
| 46 | .It Pa /etc/ssh/sshd_config |
| 47 | .El |
| 48 | .Sh DESCRIPTION |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 49 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 50 | reads configuration data from |
| 51 | .Pa /etc/ssh/sshd_config |
| 52 | (or the file specified with |
| 53 | .Fl f |
| 54 | on the command line). |
| 55 | The file contains keyword-argument pairs, one per line. |
| 56 | Lines starting with |
| 57 | .Ql # |
| 58 | and empty lines are interpreted as comments. |
Damien Miller | 306d118 | 2006-03-15 12:05:59 +1100 | [diff] [blame^] | 59 | Arguments may optionally be enclosed in double quotes |
| 60 | .Pq \&" |
| 61 | in order to represent arguments containing spaces. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 62 | .Pp |
| 63 | The possible |
| 64 | keywords and their meanings are as follows (note that |
| 65 | keywords are case-insensitive and arguments are case-sensitive): |
| 66 | .Bl -tag -width Ds |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 67 | .It Cm AcceptEnv |
| 68 | Specifies what environment variables sent by the client will be copied into |
| 69 | the session's |
| 70 | .Xr environ 7 . |
| 71 | See |
| 72 | .Cm SendEnv |
| 73 | in |
| 74 | .Xr ssh_config 5 |
| 75 | for how to configure the client. |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 76 | Note that environment passing is only supported for protocol 2. |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 77 | Variables are specified by name, which may contain the wildcard characters |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 78 | .Ql * |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 79 | and |
| 80 | .Ql \&? . |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 81 | Multiple environment variables may be separated by whitespace or spread |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 82 | across multiple |
| 83 | .Cm AcceptEnv |
| 84 | directives. |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 85 | Be warned that some environment variables could be used to bypass restricted |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 86 | user environments. |
| 87 | For this reason, care should be taken in the use of this directive. |
| 88 | The default is not to accept any environment variables. |
Darren Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 89 | .It Cm AddressFamily |
| 90 | Specifies which address family should be used by |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 91 | .Xr sshd 8 . |
Darren Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 92 | Valid arguments are |
| 93 | .Dq any , |
| 94 | .Dq inet |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 95 | (use IPv4 only), or |
Darren Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 96 | .Dq inet6 |
| 97 | (use IPv6 only). |
| 98 | The default is |
| 99 | .Dq any . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 100 | .It Cm AllowGroups |
| 101 | This keyword can be followed by a list of group name patterns, separated |
| 102 | by spaces. |
| 103 | If specified, login is allowed only for users whose primary |
| 104 | group or supplementary group list matches one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 105 | Only group names are valid; a numerical group ID is not recognized. |
| 106 | By default, login is allowed for all groups. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 107 | The allow/deny directives are processed in the following order: |
| 108 | .Cm DenyUsers , |
| 109 | .Cm AllowUsers , |
| 110 | .Cm DenyGroups , |
| 111 | and finally |
| 112 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 113 | .Pp |
| 114 | See |
| 115 | .Sx PATTERNS |
| 116 | in |
| 117 | .Xr ssh_config 5 |
| 118 | for more information on patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 119 | .It Cm AllowTcpForwarding |
| 120 | Specifies whether TCP forwarding is permitted. |
| 121 | The default is |
| 122 | .Dq yes . |
| 123 | Note that disabling TCP forwarding does not improve security unless |
| 124 | users are also denied shell access, as they can always install their |
| 125 | own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 126 | .It Cm AllowUsers |
| 127 | This keyword can be followed by a list of user name patterns, separated |
| 128 | by spaces. |
Damien Miller | 5a93add | 2003-01-24 11:34:52 +1100 | [diff] [blame] | 129 | If specified, login is allowed only for user names that |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 130 | match one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 131 | Only user names are valid; a numerical user ID is not recognized. |
| 132 | By default, login is allowed for all users. |
| 133 | If the pattern takes the form USER@HOST then USER and HOST |
| 134 | are separately checked, restricting logins to particular |
| 135 | users from particular hosts. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 136 | The allow/deny directives are processed in the following order: |
| 137 | .Cm DenyUsers , |
| 138 | .Cm AllowUsers , |
| 139 | .Cm DenyGroups , |
| 140 | and finally |
| 141 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 142 | .Pp |
| 143 | See |
| 144 | .Sx PATTERNS |
| 145 | in |
| 146 | .Xr ssh_config 5 |
| 147 | for more information on patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 148 | .It Cm AuthorizedKeysFile |
| 149 | Specifies the file that contains the public keys that can be used |
| 150 | for user authentication. |
| 151 | .Cm AuthorizedKeysFile |
| 152 | may contain tokens of the form %T which are substituted during connection |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 153 | setup. |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 154 | The following tokens are defined: %% is replaced by a literal '%', |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 155 | %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] | 156 | %u is replaced by the username of that user. |
| 157 | After expansion, |
| 158 | .Cm AuthorizedKeysFile |
| 159 | is taken to be an absolute path or one relative to the user's home |
| 160 | directory. |
| 161 | The default is |
| 162 | .Dq .ssh/authorized_keys . |
| 163 | .It Cm Banner |
| 164 | In some jurisdictions, sending a warning message before authentication |
| 165 | may be relevant for getting legal protection. |
| 166 | The contents of the specified file are sent to the remote user before |
| 167 | authentication is allowed. |
| 168 | This option is only available for protocol version 2. |
| 169 | By default, no banner is displayed. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 170 | .It Cm ChallengeResponseAuthentication |
Damien Miller | 1faa713 | 2006-03-15 11:55:31 +1100 | [diff] [blame] | 171 | Specifies whether challenge-response authentication is allowed. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 172 | All authentication styles from |
| 173 | .Xr login.conf 5 |
| 174 | are supported. |
| 175 | The default is |
| 176 | .Dq yes . |
| 177 | .It Cm Ciphers |
| 178 | Specifies the ciphers allowed for protocol version 2. |
| 179 | Multiple ciphers must be comma-separated. |
Damien Miller | 05202ff | 2004-06-15 10:30:39 +1000 | [diff] [blame] | 180 | The supported ciphers are |
| 181 | .Dq 3des-cbc , |
| 182 | .Dq aes128-cbc , |
| 183 | .Dq aes192-cbc , |
| 184 | .Dq aes256-cbc , |
| 185 | .Dq aes128-ctr , |
| 186 | .Dq aes192-ctr , |
| 187 | .Dq aes256-ctr , |
Damien Miller | 3710f27 | 2005-05-26 12:19:17 +1000 | [diff] [blame] | 188 | .Dq arcfour128 , |
| 189 | .Dq arcfour256 , |
Damien Miller | 05202ff | 2004-06-15 10:30:39 +1000 | [diff] [blame] | 190 | .Dq arcfour , |
| 191 | .Dq blowfish-cbc , |
| 192 | and |
| 193 | .Dq cast128-cbc . |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 194 | The default is: |
| 195 | .Bd -literal -offset 3n |
| 196 | aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128, |
| 197 | arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr, |
| 198 | aes192-ctr,aes256-ctr |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 199 | .Ed |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 200 | .It Cm ClientAliveCountMax |
Damien Miller | b797770 | 2006-01-03 18:47:31 +1100 | [diff] [blame] | 201 | Sets the number of client alive messages (see below) which may be |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 202 | sent without |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 203 | .Xr sshd 8 |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 204 | receiving any messages back from the client. |
| 205 | If this threshold is reached while client alive messages are being sent, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 206 | sshd will disconnect the client, terminating the session. |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 207 | It is important to note that the use of client alive messages is very |
| 208 | different from |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 209 | .Cm TCPKeepAlive |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 210 | (below). |
| 211 | The client alive messages are sent through the encrypted channel |
| 212 | and therefore will not be spoofable. |
| 213 | The TCP keepalive option enabled by |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 214 | .Cm TCPKeepAlive |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 215 | is spoofable. |
| 216 | The client alive mechanism is valuable when the client or |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 217 | server depend on knowing when a connection has become inactive. |
| 218 | .Pp |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 219 | The default value is 3. |
| 220 | If |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 221 | .Cm ClientAliveInterval |
Damien Miller | b797770 | 2006-01-03 18:47:31 +1100 | [diff] [blame] | 222 | (see below) is set to 15, and |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 223 | .Cm ClientAliveCountMax |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 224 | is left at the default, unresponsive SSH clients |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 225 | will be disconnected after approximately 45 seconds. |
Damien Miller | 1594ad5 | 2005-05-26 12:12:19 +1000 | [diff] [blame] | 226 | .It Cm ClientAliveInterval |
| 227 | Sets a timeout interval in seconds after which if no data has been received |
| 228 | from the client, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 229 | .Xr sshd 8 |
Damien Miller | 1594ad5 | 2005-05-26 12:12:19 +1000 | [diff] [blame] | 230 | will send a message through the encrypted |
| 231 | channel to request a response from the client. |
| 232 | The default |
| 233 | is 0, indicating that these messages will not be sent to the client. |
| 234 | This option applies to protocol version 2 only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 235 | .It Cm Compression |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 236 | Specifies whether compression is allowed, or delayed until |
| 237 | the user has authenticated successfully. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 238 | The argument must be |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 239 | .Dq yes , |
| 240 | .Dq delayed , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 241 | or |
| 242 | .Dq no . |
| 243 | The default is |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 244 | .Dq delayed . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 245 | .It Cm DenyGroups |
| 246 | This keyword can be followed by a list of group name patterns, separated |
| 247 | by spaces. |
| 248 | Login is disallowed for users whose primary group or supplementary |
| 249 | group list matches one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 250 | Only group names are valid; a numerical group ID is not recognized. |
| 251 | By default, login is allowed for all groups. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 252 | The allow/deny directives are processed in the following order: |
| 253 | .Cm DenyUsers , |
| 254 | .Cm AllowUsers , |
| 255 | .Cm DenyGroups , |
| 256 | and finally |
| 257 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 258 | .Pp |
| 259 | See |
| 260 | .Sx PATTERNS |
| 261 | in |
| 262 | .Xr ssh_config 5 |
| 263 | for more information on patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 264 | .It Cm DenyUsers |
| 265 | This keyword can be followed by a list of user name patterns, separated |
| 266 | by spaces. |
| 267 | Login is disallowed for user names that match one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 268 | Only user names are valid; a numerical user ID is not recognized. |
| 269 | By default, login is allowed for all users. |
| 270 | If the pattern takes the form USER@HOST then USER and HOST |
| 271 | are separately checked, restricting logins to particular |
| 272 | users from particular hosts. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 273 | The allow/deny directives are processed in the following order: |
| 274 | .Cm DenyUsers , |
| 275 | .Cm AllowUsers , |
| 276 | .Cm DenyGroups , |
| 277 | and finally |
| 278 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 279 | .Pp |
| 280 | See |
| 281 | .Sx PATTERNS |
| 282 | in |
| 283 | .Xr ssh_config 5 |
| 284 | for more information on patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 285 | .It Cm GatewayPorts |
| 286 | Specifies whether remote hosts are allowed to connect to ports |
| 287 | forwarded for the client. |
| 288 | By default, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 289 | .Xr sshd 8 |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 290 | binds remote port forwardings to the loopback address. |
| 291 | This prevents other remote hosts from connecting to forwarded ports. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 292 | .Cm GatewayPorts |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 293 | can be used to specify that sshd |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 294 | should allow remote port forwardings to bind to non-loopback addresses, thus |
| 295 | allowing other hosts to connect. |
| 296 | The argument may be |
| 297 | .Dq no |
| 298 | 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] | 299 | .Dq yes |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 300 | to force remote port forwardings to bind to the wildcard address, or |
| 301 | .Dq clientspecified |
| 302 | 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] | 303 | The default is |
| 304 | .Dq no . |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 305 | .It Cm GSSAPIAuthentication |
Damien Miller | 9b7b03b | 2003-09-02 22:57:05 +1000 | [diff] [blame] | 306 | Specifies whether user authentication based on GSSAPI is allowed. |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 307 | The default is |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 308 | .Dq no . |
| 309 | Note that this option applies to protocol version 2 only. |
| 310 | .It Cm GSSAPICleanupCredentials |
| 311 | Specifies whether to automatically destroy the user's credentials cache |
| 312 | on logout. |
| 313 | The default is |
| 314 | .Dq yes . |
| 315 | Note that this option applies to protocol version 2 only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 316 | .It Cm HostbasedAuthentication |
| 317 | Specifies whether rhosts or /etc/hosts.equiv authentication together |
| 318 | with successful public key client host authentication is allowed |
Damien Miller | 1faa713 | 2006-03-15 11:55:31 +1100 | [diff] [blame] | 319 | (host-based authentication). |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 320 | This option is similar to |
| 321 | .Cm RhostsRSAAuthentication |
| 322 | and applies to protocol version 2 only. |
| 323 | The default is |
| 324 | .Dq no . |
| 325 | .It Cm HostKey |
| 326 | Specifies a file containing a private host key |
| 327 | used by SSH. |
| 328 | The default is |
| 329 | .Pa /etc/ssh/ssh_host_key |
| 330 | for protocol version 1, and |
| 331 | .Pa /etc/ssh/ssh_host_rsa_key |
| 332 | and |
| 333 | .Pa /etc/ssh/ssh_host_dsa_key |
| 334 | for protocol version 2. |
| 335 | Note that |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 336 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 337 | will refuse to use a file if it is group/world-accessible. |
| 338 | It is possible to have multiple host key files. |
| 339 | .Dq rsa1 |
| 340 | keys are used for version 1 and |
| 341 | .Dq dsa |
| 342 | or |
| 343 | .Dq rsa |
| 344 | are used for version 2 of the SSH protocol. |
| 345 | .It Cm IgnoreRhosts |
| 346 | Specifies that |
| 347 | .Pa .rhosts |
| 348 | and |
| 349 | .Pa .shosts |
| 350 | files will not be used in |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 351 | .Cm RhostsRSAAuthentication |
| 352 | or |
| 353 | .Cm HostbasedAuthentication . |
| 354 | .Pp |
| 355 | .Pa /etc/hosts.equiv |
| 356 | and |
| 357 | .Pa /etc/shosts.equiv |
| 358 | are still used. |
| 359 | The default is |
| 360 | .Dq yes . |
| 361 | .It Cm IgnoreUserKnownHosts |
| 362 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 363 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 364 | should ignore the user's |
Damien Miller | 167ea5d | 2005-05-26 12:04:02 +1000 | [diff] [blame] | 365 | .Pa ~/.ssh/known_hosts |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 366 | during |
| 367 | .Cm RhostsRSAAuthentication |
| 368 | or |
| 369 | .Cm HostbasedAuthentication . |
| 370 | The default is |
| 371 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 372 | .It Cm KerberosAuthentication |
Damien Miller | 1a0c0b9 | 2003-09-02 22:51:17 +1000 | [diff] [blame] | 373 | Specifies whether the password provided by the user for |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 374 | .Cm PasswordAuthentication |
Damien Miller | 1a0c0b9 | 2003-09-02 22:51:17 +1000 | [diff] [blame] | 375 | will be validated through the Kerberos KDC. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 376 | To use this option, the server needs a |
| 377 | Kerberos servtab which allows the verification of the KDC's identity. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 378 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 379 | .Dq no . |
Damien Miller | 8448e66 | 2004-03-08 23:13:15 +1100 | [diff] [blame] | 380 | .It Cm KerberosGetAFSToken |
Darren Tucker | e2dd2d5 | 2005-10-03 18:19:06 +1000 | [diff] [blame] | 381 | 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] | 382 | an AFS token before accessing the user's home directory. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 383 | The default is |
Damien Miller | 8448e66 | 2004-03-08 23:13:15 +1100 | [diff] [blame] | 384 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 385 | .It Cm KerberosOrLocalPasswd |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 386 | If password authentication through Kerberos fails then |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 387 | the password will be validated via any additional local mechanism |
| 388 | such as |
| 389 | .Pa /etc/passwd . |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 390 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 391 | .Dq yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 392 | .It Cm KerberosTicketCleanup |
| 393 | Specifies whether to automatically destroy the user's ticket cache |
| 394 | file on logout. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 395 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 396 | .Dq yes . |
| 397 | .It Cm KeyRegenerationInterval |
| 398 | In protocol version 1, the ephemeral server key is automatically regenerated |
| 399 | after this many seconds (if it has been used). |
| 400 | The purpose of regeneration is to prevent |
| 401 | decrypting captured sessions by later breaking into the machine and |
| 402 | stealing the keys. |
| 403 | The key is never stored anywhere. |
| 404 | If the value is 0, the key is never regenerated. |
| 405 | The default is 3600 (seconds). |
| 406 | .It Cm ListenAddress |
| 407 | Specifies the local addresses |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 408 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 409 | should listen on. |
| 410 | The following forms may be used: |
| 411 | .Pp |
| 412 | .Bl -item -offset indent -compact |
| 413 | .It |
| 414 | .Cm ListenAddress |
| 415 | .Sm off |
| 416 | .Ar host No | Ar IPv4_addr No | Ar IPv6_addr |
| 417 | .Sm on |
| 418 | .It |
| 419 | .Cm ListenAddress |
| 420 | .Sm off |
| 421 | .Ar host No | Ar IPv4_addr No : Ar port |
| 422 | .Sm on |
| 423 | .It |
| 424 | .Cm ListenAddress |
| 425 | .Sm off |
| 426 | .Oo |
| 427 | .Ar host No | Ar IPv6_addr Oc : Ar port |
| 428 | .Sm on |
| 429 | .El |
| 430 | .Pp |
| 431 | If |
| 432 | .Ar port |
| 433 | is not specified, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 434 | sshd will listen on the address and all prior |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 435 | .Cm Port |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 436 | options specified. |
| 437 | The default is to listen on all local addresses. |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 438 | Multiple |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 439 | .Cm ListenAddress |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 440 | options are permitted. |
| 441 | Additionally, any |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 442 | .Cm Port |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 443 | options must precede this option for non-port qualified addresses. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 444 | .It Cm LoginGraceTime |
| 445 | The server disconnects after this time if the user has not |
| 446 | successfully logged in. |
| 447 | If the value is 0, there is no time limit. |
Damien Miller | c134863 | 2002-09-05 14:35:14 +1000 | [diff] [blame] | 448 | The default is 120 seconds. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 449 | .It Cm LogLevel |
| 450 | Gives the verbosity level that is used when logging messages from |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 451 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 452 | The possible values are: |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 453 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 454 | The default is INFO. |
| 455 | DEBUG and DEBUG1 are equivalent. |
| 456 | DEBUG2 and DEBUG3 each specify higher levels of debugging output. |
| 457 | 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] | 458 | .It Cm MACs |
| 459 | Specifies the available MAC (message authentication code) algorithms. |
| 460 | The MAC algorithm is used in protocol version 2 |
| 461 | for data integrity protection. |
| 462 | Multiple algorithms must be comma-separated. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 463 | The default is: |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 464 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . |
Darren Tucker | 89413db | 2004-05-24 10:36:23 +1000 | [diff] [blame] | 465 | .It Cm MaxAuthTries |
| 466 | Specifies the maximum number of authentication attempts permitted per |
Damien Miller | 26213e5 | 2004-06-30 22:39:34 +1000 | [diff] [blame] | 467 | connection. |
| 468 | Once the number of failures reaches half this value, |
| 469 | additional failures are logged. |
| 470 | The default is 6. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 471 | .It Cm MaxStartups |
| 472 | Specifies the maximum number of concurrent unauthenticated connections to the |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 473 | SSH daemon. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 474 | Additional connections will be dropped until authentication succeeds or the |
| 475 | .Cm LoginGraceTime |
| 476 | expires for a connection. |
| 477 | The default is 10. |
| 478 | .Pp |
| 479 | Alternatively, random early drop can be enabled by specifying |
| 480 | the three colon separated values |
| 481 | .Dq start:rate:full |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 482 | (e.g. "10:30:60"). |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 483 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 484 | will refuse connection attempts with a probability of |
| 485 | .Dq rate/100 |
| 486 | (30%) |
| 487 | if there are currently |
| 488 | .Dq start |
| 489 | (10) |
| 490 | unauthenticated connections. |
| 491 | The probability increases linearly and all connection attempts |
| 492 | are refused if the number of unauthenticated connections reaches |
| 493 | .Dq full |
| 494 | (60). |
| 495 | .It Cm PasswordAuthentication |
| 496 | Specifies whether password authentication is allowed. |
| 497 | The default is |
| 498 | .Dq yes . |
| 499 | .It Cm PermitEmptyPasswords |
| 500 | When password authentication is allowed, it specifies whether the |
| 501 | server allows login to accounts with empty password strings. |
| 502 | The default is |
| 503 | .Dq no . |
| 504 | .It Cm PermitRootLogin |
Darren Tucker | b350901 | 2005-01-20 11:01:46 +1100 | [diff] [blame] | 505 | Specifies whether root can log in using |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 506 | .Xr ssh 1 . |
| 507 | The argument must be |
| 508 | .Dq yes , |
| 509 | .Dq without-password , |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 510 | .Dq forced-commands-only , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 511 | or |
| 512 | .Dq no . |
| 513 | The default is |
| 514 | .Dq yes . |
| 515 | .Pp |
| 516 | If this option is set to |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 517 | .Dq without-password , |
Darren Tucker | 9dca099 | 2005-02-01 19:16:45 +1100 | [diff] [blame] | 518 | password authentication is disabled for root. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 519 | .Pp |
| 520 | If this option is set to |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 521 | .Dq forced-commands-only , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 522 | root login with public key authentication will be allowed, |
| 523 | but only if the |
| 524 | .Ar command |
| 525 | option has been specified |
| 526 | (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] | 527 | normally not allowed). |
| 528 | All other authentication methods are disabled for root. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 529 | .Pp |
| 530 | If this option is set to |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 531 | .Dq no , |
Darren Tucker | b350901 | 2005-01-20 11:01:46 +1100 | [diff] [blame] | 532 | root is not allowed to log in. |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 533 | .It Cm PermitTunnel |
| 534 | Specifies whether |
| 535 | .Xr tun 4 |
| 536 | device forwarding is allowed. |
Damien Miller | 7b58e80 | 2005-12-13 19:33:19 +1100 | [diff] [blame] | 537 | The argument must be |
| 538 | .Dq yes , |
| 539 | .Dq point-to-point , |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 540 | .Dq ethernet , |
Damien Miller | 7b58e80 | 2005-12-13 19:33:19 +1100 | [diff] [blame] | 541 | or |
| 542 | .Dq no . |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 543 | The default is |
| 544 | .Dq no . |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 545 | .It Cm PermitUserEnvironment |
| 546 | Specifies whether |
| 547 | .Pa ~/.ssh/environment |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 548 | and |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 549 | .Cm environment= |
| 550 | options in |
| 551 | .Pa ~/.ssh/authorized_keys |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 552 | are processed by |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 553 | .Xr sshd 8 . |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 554 | The default is |
| 555 | .Dq no . |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 556 | Enabling environment processing may enable users to bypass access |
| 557 | restrictions in some configurations using mechanisms such as |
| 558 | .Ev LD_PRELOAD . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 559 | .It Cm PidFile |
Ben Lindstrom | 959de99 | 2002-06-23 00:35:25 +0000 | [diff] [blame] | 560 | Specifies the file that contains the process ID of the |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 561 | SSH daemon. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 562 | The default is |
| 563 | .Pa /var/run/sshd.pid . |
| 564 | .It Cm Port |
| 565 | Specifies the port number that |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 566 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 567 | listens on. |
| 568 | The default is 22. |
| 569 | Multiple options of this type are permitted. |
| 570 | See also |
| 571 | .Cm ListenAddress . |
| 572 | .It Cm PrintLastLog |
| 573 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 574 | .Xr sshd 8 |
Darren Tucker | 7cc5c23 | 2004-11-05 20:06:59 +1100 | [diff] [blame] | 575 | should print the date and time of the last user login when a user logs |
| 576 | in interactively. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 577 | The default is |
| 578 | .Dq yes . |
| 579 | .It Cm PrintMotd |
| 580 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 581 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 582 | should print |
| 583 | .Pa /etc/motd |
| 584 | when a user logs in interactively. |
| 585 | (On some systems it is also printed by the shell, |
| 586 | .Pa /etc/profile , |
| 587 | or equivalent.) |
| 588 | The default is |
| 589 | .Dq yes . |
| 590 | .It Cm Protocol |
| 591 | Specifies the protocol versions |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 592 | .Xr sshd 8 |
Ben Lindstrom | 9c44554 | 2002-07-11 03:59:18 +0000 | [diff] [blame] | 593 | supports. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 594 | The possible values are |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 595 | .Sq 1 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 596 | and |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 597 | .Sq 2 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 598 | Multiple versions must be comma-separated. |
| 599 | The default is |
| 600 | .Dq 2,1 . |
Ben Lindstrom | 9c44554 | 2002-07-11 03:59:18 +0000 | [diff] [blame] | 601 | Note that the order of the protocol list does not indicate preference, |
| 602 | because the client selects among multiple protocol versions offered |
| 603 | by the server. |
| 604 | Specifying |
| 605 | .Dq 2,1 |
| 606 | is identical to |
| 607 | .Dq 1,2 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 608 | .It Cm PubkeyAuthentication |
| 609 | Specifies whether public key authentication is allowed. |
| 610 | The default is |
| 611 | .Dq yes . |
| 612 | Note that this option applies to protocol version 2 only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 613 | .It Cm RhostsRSAAuthentication |
| 614 | Specifies whether rhosts or /etc/hosts.equiv authentication together |
| 615 | with successful RSA host authentication is allowed. |
| 616 | The default is |
| 617 | .Dq no . |
| 618 | This option applies to protocol version 1 only. |
| 619 | .It Cm RSAAuthentication |
| 620 | Specifies whether pure RSA authentication is allowed. |
| 621 | The default is |
| 622 | .Dq yes . |
| 623 | This option applies to protocol version 1 only. |
| 624 | .It Cm ServerKeyBits |
| 625 | Defines the number of bits in the ephemeral protocol version 1 server key. |
| 626 | The minimum value is 512, and the default is 768. |
| 627 | .It Cm StrictModes |
| 628 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 629 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 630 | should check file modes and ownership of the |
| 631 | user's files and home directory before accepting login. |
| 632 | This is normally desirable because novices sometimes accidentally leave their |
| 633 | directory or files world-writable. |
| 634 | The default is |
| 635 | .Dq yes . |
| 636 | .It Cm Subsystem |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 637 | Configures an external subsystem (e.g. file transfer daemon). |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 638 | Arguments should be a subsystem name and a command to execute upon subsystem |
| 639 | request. |
| 640 | The command |
| 641 | .Xr sftp-server 8 |
| 642 | implements the |
| 643 | .Dq sftp |
| 644 | file transfer subsystem. |
| 645 | By default no subsystems are defined. |
| 646 | Note that this option applies to protocol version 2 only. |
| 647 | .It Cm SyslogFacility |
| 648 | Gives the facility code that is used when logging messages from |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 649 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 650 | The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, |
| 651 | LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. |
| 652 | The default is AUTH. |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 653 | .It Cm TCPKeepAlive |
| 654 | Specifies whether the system should send TCP keepalive messages to the |
| 655 | other side. |
| 656 | If they are sent, death of the connection or crash of one |
| 657 | of the machines will be properly noticed. |
| 658 | However, this means that |
| 659 | connections will die if the route is down temporarily, and some people |
| 660 | find it annoying. |
| 661 | On the other hand, if TCP keepalives are not sent, |
| 662 | sessions may hang indefinitely on the server, leaving |
| 663 | .Dq ghost |
| 664 | users and consuming server resources. |
| 665 | .Pp |
| 666 | The default is |
| 667 | .Dq yes |
| 668 | (to send TCP keepalive messages), and the server will notice |
| 669 | if the network goes down or the client host crashes. |
| 670 | This avoids infinitely hanging sessions. |
| 671 | .Pp |
| 672 | To disable TCP keepalive messages, the value should be set to |
| 673 | .Dq no . |
Damien Miller | 3a961dc | 2003-06-03 10:25:48 +1000 | [diff] [blame] | 674 | .It Cm UseDNS |
| 675 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 676 | .Xr sshd 8 |
Darren Tucker | 83d5a98 | 2005-03-31 21:33:50 +1000 | [diff] [blame] | 677 | should look up the remote host name and check that |
Damien Miller | 3a961dc | 2003-06-03 10:25:48 +1000 | [diff] [blame] | 678 | the resolved host name for the remote IP address maps back to the |
| 679 | very same IP address. |
| 680 | The default is |
| 681 | .Dq yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 682 | .It Cm UseLogin |
| 683 | Specifies whether |
| 684 | .Xr login 1 |
| 685 | is used for interactive login sessions. |
| 686 | The default is |
| 687 | .Dq no . |
| 688 | Note that |
| 689 | .Xr login 1 |
| 690 | is never used for remote command execution. |
| 691 | Note also, that if this is enabled, |
| 692 | .Cm X11Forwarding |
| 693 | will be disabled because |
| 694 | .Xr login 1 |
| 695 | does not know how to handle |
| 696 | .Xr xauth 1 |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 697 | cookies. |
| 698 | If |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 699 | .Cm UsePrivilegeSeparation |
| 700 | is specified, it will be disabled after authentication. |
Damien Miller | 2e193e2 | 2003-05-14 15:13:03 +1000 | [diff] [blame] | 701 | .It Cm UsePAM |
Darren Tucker | 1dcff9a | 2004-05-13 16:51:40 +1000 | [diff] [blame] | 702 | Enables the Pluggable Authentication Module interface. |
| 703 | If set to |
| 704 | .Dq yes |
| 705 | this will enable PAM authentication using |
| 706 | .Cm ChallengeResponseAuthentication |
Darren Tucker | a4904f7 | 2006-02-23 21:35:30 +1100 | [diff] [blame] | 707 | and |
| 708 | .Cm PasswordAuthentication |
| 709 | in addition to PAM account and session module processing for all |
| 710 | authentication types. |
Darren Tucker | 1dcff9a | 2004-05-13 16:51:40 +1000 | [diff] [blame] | 711 | .Pp |
| 712 | Because PAM challenge-response authentication usually serves an equivalent |
| 713 | role to password authentication, you should disable either |
| 714 | .Cm PasswordAuthentication |
| 715 | or |
| 716 | .Cm ChallengeResponseAuthentication. |
| 717 | .Pp |
| 718 | If |
| 719 | .Cm UsePAM |
| 720 | is enabled, you will not be able to run |
| 721 | .Xr sshd 8 |
| 722 | as a non-root user. |
| 723 | The default is |
Darren Tucker | 6c0c070 | 2003-10-09 14:13:53 +1000 | [diff] [blame] | 724 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 725 | .It Cm UsePrivilegeSeparation |
| 726 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 727 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 728 | separates privileges by creating an unprivileged child process |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 729 | to deal with incoming network traffic. |
| 730 | After successful authentication, another process will be created that has |
| 731 | the privilege of the authenticated user. |
| 732 | The goal of privilege separation is to prevent privilege |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 733 | escalation by containing any corruption within the unprivileged processes. |
| 734 | The default is |
| 735 | .Dq yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 736 | .It Cm X11DisplayOffset |
| 737 | Specifies the first display number available for |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 738 | .Xr sshd 8 Ns 's |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 739 | X11 forwarding. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 740 | This prevents sshd from interfering with real X11 servers. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 741 | The default is 10. |
| 742 | .It Cm X11Forwarding |
| 743 | Specifies whether X11 forwarding is permitted. |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 744 | The argument must be |
| 745 | .Dq yes |
| 746 | or |
| 747 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 748 | The default is |
| 749 | .Dq no . |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 750 | .Pp |
| 751 | When X11 forwarding is enabled, there may be additional exposure to |
| 752 | the server and to client displays if the |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 753 | .Xr sshd 8 |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 754 | proxy display is configured to listen on the wildcard address (see |
| 755 | .Cm X11UseLocalhost |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 756 | below), though this is not the default. |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 757 | Additionally, the authentication spoofing and authentication data |
| 758 | verification and substitution occur on the client side. |
| 759 | 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] | 760 | display server may be exposed to attack when the SSH client requests |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 761 | forwarding (see the warnings for |
| 762 | .Cm ForwardX11 |
| 763 | in |
Damien Miller | f1ce505 | 2003-06-11 22:04:39 +1000 | [diff] [blame] | 764 | .Xr ssh_config 5 ) . |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 765 | A system administrator may have a stance in which they want to |
| 766 | protect clients that may expose themselves to attack by unwittingly |
| 767 | requesting X11 forwarding, which can warrant a |
| 768 | .Dq no |
| 769 | setting. |
| 770 | .Pp |
| 771 | Note that disabling X11 forwarding does not prevent users from |
| 772 | forwarding X11 traffic, as users can always install their own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 773 | X11 forwarding is automatically disabled if |
| 774 | .Cm UseLogin |
| 775 | is enabled. |
| 776 | .It Cm X11UseLocalhost |
| 777 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 778 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 779 | should bind the X11 forwarding server to the loopback address or to |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 780 | the wildcard address. |
| 781 | By default, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 782 | sshd binds the forwarding server to the loopback address and sets the |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 783 | hostname part of the |
| 784 | .Ev DISPLAY |
| 785 | environment variable to |
| 786 | .Dq localhost . |
Ben Lindstrom | 15b6120 | 2002-08-20 18:44:24 +0000 | [diff] [blame] | 787 | This prevents remote hosts from connecting to the proxy display. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 788 | However, some older X11 clients may not function with this |
| 789 | configuration. |
| 790 | .Cm X11UseLocalhost |
| 791 | may be set to |
| 792 | .Dq no |
| 793 | to specify that the forwarding server should be bound to the wildcard |
| 794 | address. |
| 795 | The argument must be |
| 796 | .Dq yes |
| 797 | or |
| 798 | .Dq no . |
| 799 | The default is |
| 800 | .Dq yes . |
| 801 | .It Cm XAuthLocation |
Damien Miller | 05913ba | 2002-09-04 16:51:03 +1000 | [diff] [blame] | 802 | Specifies the full pathname of the |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 803 | .Xr xauth 1 |
| 804 | program. |
| 805 | The default is |
| 806 | .Pa /usr/X11R6/bin/xauth . |
| 807 | .El |
Damien Miller | e3beba2 | 2006-03-15 11:59:25 +1100 | [diff] [blame] | 808 | .Sh TIME FORMATS |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 809 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 810 | command-line arguments and configuration file options that specify time |
| 811 | may be expressed using a sequence of the form: |
| 812 | .Sm off |
Ben Lindstrom | 1f8cf4f | 2002-08-20 18:43:27 +0000 | [diff] [blame] | 813 | .Ar time Op Ar qualifier , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 814 | .Sm on |
| 815 | where |
| 816 | .Ar time |
| 817 | is a positive integer value and |
| 818 | .Ar qualifier |
| 819 | is one of the following: |
| 820 | .Pp |
| 821 | .Bl -tag -width Ds -compact -offset indent |
| 822 | .It Cm <none> |
| 823 | seconds |
| 824 | .It Cm s | Cm S |
| 825 | seconds |
| 826 | .It Cm m | Cm M |
| 827 | minutes |
| 828 | .It Cm h | Cm H |
| 829 | hours |
| 830 | .It Cm d | Cm D |
| 831 | days |
| 832 | .It Cm w | Cm W |
| 833 | weeks |
| 834 | .El |
| 835 | .Pp |
| 836 | Each member of the sequence is added together to calculate |
| 837 | the total time value. |
| 838 | .Pp |
| 839 | Time format examples: |
| 840 | .Pp |
| 841 | .Bl -tag -width Ds -compact -offset indent |
| 842 | .It 600 |
| 843 | 600 seconds (10 minutes) |
| 844 | .It 10m |
| 845 | 10 minutes |
| 846 | .It 1h30m |
| 847 | 1 hour 30 minutes (90 minutes) |
| 848 | .El |
| 849 | .Sh FILES |
| 850 | .Bl -tag -width Ds |
| 851 | .It Pa /etc/ssh/sshd_config |
| 852 | Contains configuration data for |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 853 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 854 | This file should be writable by root only, but it is recommended |
| 855 | (though not necessary) that it be world-readable. |
| 856 | .El |
Damien Miller | f1ce505 | 2003-06-11 22:04:39 +1000 | [diff] [blame] | 857 | .Sh SEE ALSO |
| 858 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 859 | .Sh AUTHORS |
| 860 | OpenSSH is a derivative of the original and free |
| 861 | ssh 1.2.12 release by Tatu Ylonen. |
| 862 | Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, |
| 863 | Theo de Raadt and Dug Song |
| 864 | removed many bugs, re-added newer features and |
| 865 | created OpenSSH. |
| 866 | Markus Friedl contributed the support for SSH |
| 867 | protocol versions 1.5 and 2.0. |
| 868 | Niels Provos and Markus Friedl contributed support |
| 869 | for privilege separation. |