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