Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1 | .\" |
| 2 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> |
| 3 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
| 4 | .\" All rights reserved |
| 5 | .\" |
| 6 | .\" As far as I am concerned, the code I have written for this software |
| 7 | .\" can be used freely for any purpose. Any derived versions of this |
| 8 | .\" software must be clearly marked as such, and if the derived work is |
| 9 | .\" incompatible with the protocol description in the RFC file, it must be |
| 10 | .\" called by a name other than "ssh" or "Secure Shell". |
| 11 | .\" |
| 12 | .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. |
| 13 | .\" Copyright (c) 1999 Aaron Campbell. All rights reserved. |
| 14 | .\" Copyright (c) 1999 Theo de Raadt. All rights reserved. |
| 15 | .\" |
| 16 | .\" Redistribution and use in source and binary forms, with or without |
| 17 | .\" modification, are permitted provided that the following conditions |
| 18 | .\" are met: |
| 19 | .\" 1. Redistributions of source code must retain the above copyright |
| 20 | .\" notice, this list of conditions and the following disclaimer. |
| 21 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| 22 | .\" notice, this list of conditions and the following disclaimer in the |
| 23 | .\" documentation and/or other materials provided with the distribution. |
| 24 | .\" |
| 25 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 26 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 27 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 28 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 29 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 30 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 31 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 32 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 33 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 34 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 35 | .\" |
djm@openbsd.org | 8f6784f | 2014-12-22 09:05:17 +0000 | [diff] [blame] | 36 | .\" $OpenBSD: sshd_config.5,v 1.188 2014/12/22 09:05:17 djm Exp $ |
djm@openbsd.org | f69b69b | 2014-12-22 07:51:30 +0000 | [diff] [blame] | 37 | .Dd $Mdocdate: December 22 2014 $ |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 38 | .Dt SSHD_CONFIG 5 |
| 39 | .Os |
| 40 | .Sh NAME |
| 41 | .Nm sshd_config |
| 42 | .Nd OpenSSH SSH daemon configuration file |
| 43 | .Sh SYNOPSIS |
Damien Miller | d94fc72 | 2007-01-05 16:29:30 +1100 | [diff] [blame] | 44 | .Nm /etc/ssh/sshd_config |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 45 | .Sh DESCRIPTION |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 46 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 47 | reads configuration data from |
| 48 | .Pa /etc/ssh/sshd_config |
| 49 | (or the file specified with |
| 50 | .Fl f |
| 51 | on the command line). |
| 52 | The file contains keyword-argument pairs, one per line. |
| 53 | Lines starting with |
| 54 | .Ql # |
| 55 | and empty lines are interpreted as comments. |
Damien Miller | 306d118 | 2006-03-15 12:05:59 +1100 | [diff] [blame] | 56 | Arguments may optionally be enclosed in double quotes |
| 57 | .Pq \&" |
| 58 | in order to represent arguments containing spaces. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 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 . |
Damien Miller | e989019 | 2008-05-19 14:59:02 +1000 | [diff] [blame] | 97 | .It Cm AllowAgentForwarding |
| 98 | Specifies whether |
| 99 | .Xr ssh-agent 1 |
| 100 | forwarding is permitted. |
| 101 | The default is |
| 102 | .Dq yes . |
| 103 | Note that disabling agent forwarding does not improve security |
| 104 | unless users are also denied shell access, as they can always install |
| 105 | their own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 106 | .It Cm AllowGroups |
| 107 | This keyword can be followed by a list of group name patterns, separated |
| 108 | by spaces. |
| 109 | If specified, login is allowed only for users whose primary |
| 110 | group or supplementary group list matches one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 111 | Only group names are valid; a numerical group ID is not recognized. |
| 112 | By default, login is allowed for all groups. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 113 | The allow/deny directives are processed in the following order: |
| 114 | .Cm DenyUsers , |
| 115 | .Cm AllowUsers , |
| 116 | .Cm DenyGroups , |
| 117 | and finally |
| 118 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 119 | .Pp |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 120 | See PATTERNS in |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 121 | .Xr ssh_config 5 |
| 122 | for more information on patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 123 | .It Cm AllowTcpForwarding |
| 124 | Specifies whether TCP forwarding is permitted. |
Damien Miller | aa5b3f8 | 2012-12-03 09:50:54 +1100 | [diff] [blame] | 125 | The available options are |
| 126 | .Dq yes |
| 127 | or |
| 128 | .Dq all |
| 129 | to allow TCP forwarding, |
| 130 | .Dq no |
| 131 | to prevent all TCP forwarding, |
| 132 | .Dq local |
| 133 | to allow local (from the perspective of |
Darren Tucker | f9333d5 | 2012-12-07 13:06:13 +1100 | [diff] [blame] | 134 | .Xr ssh 1 ) |
| 135 | forwarding only or |
Damien Miller | aa5b3f8 | 2012-12-03 09:50:54 +1100 | [diff] [blame] | 136 | .Dq remote |
| 137 | to allow remote forwarding only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 138 | The default is |
| 139 | .Dq yes . |
| 140 | Note that disabling TCP forwarding does not improve security unless |
| 141 | users are also denied shell access, as they can always install their |
| 142 | own forwarders. |
Damien Miller | 7acefbb | 2014-07-18 14:11:24 +1000 | [diff] [blame] | 143 | .It Cm AllowStreamLocalForwarding |
| 144 | Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted. |
| 145 | The available options are |
| 146 | .Dq yes |
| 147 | or |
| 148 | .Dq all |
| 149 | to allow StreamLocal forwarding, |
| 150 | .Dq no |
| 151 | to prevent all StreamLocal forwarding, |
| 152 | .Dq local |
| 153 | to allow local (from the perspective of |
| 154 | .Xr ssh 1 ) |
| 155 | forwarding only or |
| 156 | .Dq remote |
| 157 | to allow remote forwarding only. |
| 158 | The default is |
| 159 | .Dq yes . |
| 160 | Note that disabling StreamLocal forwarding does not improve security unless |
| 161 | users are also denied shell access, as they can always install their |
| 162 | own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 163 | .It Cm AllowUsers |
| 164 | This keyword can be followed by a list of user name patterns, separated |
| 165 | by spaces. |
Damien Miller | 5a93add | 2003-01-24 11:34:52 +1100 | [diff] [blame] | 166 | If specified, login is allowed only for user names that |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 167 | match one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 168 | Only user names are valid; a numerical user ID is not recognized. |
| 169 | By default, login is allowed for all users. |
| 170 | If the pattern takes the form USER@HOST then USER and HOST |
| 171 | are separately checked, restricting logins to particular |
| 172 | users from particular hosts. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 173 | The allow/deny directives are processed in the following order: |
| 174 | .Cm DenyUsers , |
| 175 | .Cm AllowUsers , |
| 176 | .Cm DenyGroups , |
| 177 | and finally |
| 178 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 179 | .Pp |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 180 | See PATTERNS in |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 181 | .Xr ssh_config 5 |
| 182 | for more information on patterns. |
Damien Miller | a6e3f01 | 2012-11-04 23:21:40 +1100 | [diff] [blame] | 183 | .It Cm AuthenticationMethods |
| 184 | Specifies the authentication methods that must be successfully completed |
| 185 | for a user to be granted access. |
| 186 | This option must be followed by one or more comma-separated lists of |
| 187 | authentication method names. |
| 188 | Successful authentication requires completion of every method in at least |
| 189 | one of these lists. |
| 190 | .Pp |
| 191 | For example, an argument of |
| 192 | .Dq publickey,password publickey,keyboard-interactive |
| 193 | would require the user to complete public key authentication, followed by |
| 194 | either password or keyboard interactive authentication. |
| 195 | Only methods that are next in one or more lists are offered at each stage, |
| 196 | so for this example, it would not be possible to attempt password or |
| 197 | keyboard-interactive authentication before public key. |
| 198 | .Pp |
Damien Miller | 91a55f2 | 2013-04-23 15:18:10 +1000 | [diff] [blame] | 199 | For keyboard interactive authentication it is also possible to |
| 200 | restrict authentication to a specific device by appending a |
| 201 | colon followed by the device identifier |
| 202 | .Dq bsdauth , |
| 203 | .Dq pam , |
| 204 | or |
| 205 | .Dq skey , |
| 206 | depending on the server configuration. |
| 207 | For example, |
| 208 | .Dq keyboard-interactive:bsdauth |
| 209 | would restrict keyboard interactive authentication to the |
| 210 | .Dq bsdauth |
| 211 | device. |
| 212 | .Pp |
djm@openbsd.org | f69b69b | 2014-12-22 07:51:30 +0000 | [diff] [blame] | 213 | If the |
| 214 | .Dq publickey |
jmc@openbsd.org | 449e11b | 2014-12-22 08:24:17 +0000 | [diff] [blame] | 215 | method is listed more than once, |
djm@openbsd.org | f69b69b | 2014-12-22 07:51:30 +0000 | [diff] [blame] | 216 | .Xr sshd 8 |
| 217 | verifies that keys that have been used successfully are not reused for |
| 218 | subsequent authentications. |
| 219 | For example, an |
| 220 | .Cm AuthenticationMethods |
| 221 | of |
| 222 | .Dq publickey,publickey |
| 223 | will require successful authentication using two different public keys. |
| 224 | .Pp |
Damien Miller | a6e3f01 | 2012-11-04 23:21:40 +1100 | [diff] [blame] | 225 | This option is only available for SSH protocol 2 and will yield a fatal |
| 226 | error if enabled if protocol 1 is also enabled. |
| 227 | Note that each authentication method listed should also be explicitly enabled |
| 228 | in the configuration. |
| 229 | The default is not to require multiple authentication; successful completion |
| 230 | of a single authentication method is sufficient. |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 231 | .It Cm AuthorizedKeysCommand |
Damien Miller | f33580e | 2012-11-04 22:22:52 +1100 | [diff] [blame] | 232 | Specifies a program to be used to look up the user's public keys. |
Damien Miller | 467b00c | 2013-04-23 15:23:07 +1000 | [diff] [blame] | 233 | The program must be owned by root and not writable by group or others. |
| 234 | It will be invoked with a single argument of the username |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 235 | being authenticated, and should produce on standard output zero or |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 236 | more lines of authorized_keys output (see AUTHORIZED_KEYS in |
Damien Miller | f33580e | 2012-11-04 22:22:52 +1100 | [diff] [blame] | 237 | .Xr sshd 8 ) . |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 238 | If a key supplied by AuthorizedKeysCommand does not successfully authenticate |
| 239 | and authorize the user then public key authentication continues using the usual |
| 240 | .Cm AuthorizedKeysFile |
| 241 | files. |
| 242 | By default, no AuthorizedKeysCommand is run. |
| 243 | .It Cm AuthorizedKeysCommandUser |
| 244 | Specifies the user under whose account the AuthorizedKeysCommand is run. |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 245 | It is recommended to use a dedicated user that has no other role on the host |
| 246 | than running authorized keys commands. |
djm@openbsd.org | f1c4d8e | 2014-12-22 08:04:23 +0000 | [diff] [blame] | 247 | If |
djm@openbsd.org | d663bea | 2014-12-11 05:25:06 +0000 | [diff] [blame] | 248 | .Cm AuthorizedKeysCommand |
djm@openbsd.org | f1c4d8e | 2014-12-22 08:04:23 +0000 | [diff] [blame] | 249 | is specified but |
| 250 | .Cm AuthorizedKeysCommandUser |
| 251 | is not, then |
| 252 | .Xr sshd 8 |
| 253 | will refuse to start. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 254 | .It Cm AuthorizedKeysFile |
| 255 | Specifies the file that contains the public keys that can be used |
| 256 | for user authentication. |
Damien Miller | 6018a36 | 2010-07-02 13:35:19 +1000 | [diff] [blame] | 257 | The format is described in the |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 258 | AUTHORIZED_KEYS FILE FORMAT |
Damien Miller | 6018a36 | 2010-07-02 13:35:19 +1000 | [diff] [blame] | 259 | section of |
| 260 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 261 | .Cm AuthorizedKeysFile |
| 262 | may contain tokens of the form %T which are substituted during connection |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 263 | setup. |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 264 | The following tokens are defined: %% is replaced by a literal '%', |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 265 | %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] | 266 | %u is replaced by the username of that user. |
| 267 | After expansion, |
| 268 | .Cm AuthorizedKeysFile |
| 269 | is taken to be an absolute path or one relative to the user's home |
| 270 | directory. |
Damien Miller | b9132fc | 2011-05-29 21:41:40 +1000 | [diff] [blame] | 271 | Multiple files may be listed, separated by whitespace. |
| 272 | The default is |
| 273 | .Dq .ssh/authorized_keys .ssh/authorized_keys2 . |
Damien Miller | 30da344 | 2010-05-10 11:58:03 +1000 | [diff] [blame] | 274 | .It Cm AuthorizedPrincipalsFile |
| 275 | Specifies a file that lists principal names that are accepted for |
| 276 | certificate authentication. |
| 277 | When using certificates signed by a key listed in |
| 278 | .Cm TrustedUserCAKeys , |
| 279 | this file lists names, one of which must appear in the certificate for it |
| 280 | to be accepted for authentication. |
Damien Miller | d59dab8 | 2010-07-02 13:37:17 +1000 | [diff] [blame] | 281 | Names are listed one per line preceded by key options (as described |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 282 | in AUTHORIZED_KEYS FILE FORMAT in |
Damien Miller | d59dab8 | 2010-07-02 13:37:17 +1000 | [diff] [blame] | 283 | .Xr sshd 8 ) . |
Damien Miller | 6018a36 | 2010-07-02 13:35:19 +1000 | [diff] [blame] | 284 | Empty lines and comments starting with |
Damien Miller | 30da344 | 2010-05-10 11:58:03 +1000 | [diff] [blame] | 285 | .Ql # |
| 286 | are ignored. |
| 287 | .Pp |
| 288 | .Cm AuthorizedPrincipalsFile |
| 289 | may contain tokens of the form %T which are substituted during connection |
| 290 | setup. |
| 291 | The following tokens are defined: %% is replaced by a literal '%', |
| 292 | %h is replaced by the home directory of the user being authenticated, and |
| 293 | %u is replaced by the username of that user. |
| 294 | After expansion, |
| 295 | .Cm AuthorizedPrincipalsFile |
| 296 | is taken to be an absolute path or one relative to the user's home |
| 297 | directory. |
| 298 | .Pp |
Damien Miller | 8fef9eb | 2012-04-22 11:25:10 +1000 | [diff] [blame] | 299 | The default is |
| 300 | .Dq none , |
| 301 | i.e. not to use a principals file \(en in this case, the username |
Damien Miller | 30da344 | 2010-05-10 11:58:03 +1000 | [diff] [blame] | 302 | of the user must appear in a certificate's principals list for it to be |
| 303 | accepted. |
| 304 | Note that |
| 305 | .Cm AuthorizedPrincipalsFile |
| 306 | is only used when authentication proceeds using a CA listed in |
| 307 | .Cm TrustedUserCAKeys |
| 308 | and is not consulted for certification authorities trusted via |
| 309 | .Pa ~/.ssh/authorized_keys , |
| 310 | though the |
| 311 | .Cm principals= |
| 312 | key option offers a similar facility (see |
| 313 | .Xr sshd 8 |
| 314 | for details). |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 315 | .It Cm Banner |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 316 | The contents of the specified file are sent to the remote user before |
| 317 | authentication is allowed. |
Damien Miller | 4890e53 | 2007-09-17 11:57:38 +1000 | [diff] [blame] | 318 | If the argument is |
| 319 | .Dq none |
| 320 | then no banner is displayed. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 321 | This option is only available for protocol version 2. |
| 322 | By default, no banner is displayed. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 323 | .It Cm ChallengeResponseAuthentication |
Damien Miller | 9c7bf8d | 2009-08-28 10:27:08 +1000 | [diff] [blame] | 324 | Specifies whether challenge-response authentication is allowed (e.g. via |
Damien Miller | e8c9f26 | 2014-10-03 09:24:56 +1000 | [diff] [blame] | 325 | PAM or through authentication styles supported in |
Damien Miller | 9c7bf8d | 2009-08-28 10:27:08 +1000 | [diff] [blame] | 326 | .Xr login.conf 5 ) |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 327 | The default is |
| 328 | .Dq yes . |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 329 | .It Cm ChrootDirectory |
Darren Tucker | b8c884a | 2010-01-08 18:53:43 +1100 | [diff] [blame] | 330 | Specifies the pathname of a directory to |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 331 | .Xr chroot 2 |
| 332 | to after authentication. |
Darren Tucker | b8c884a | 2010-01-08 18:53:43 +1100 | [diff] [blame] | 333 | All components of the pathname must be root-owned directories that are |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 334 | not writable by any other user or group. |
Darren Tucker | 51dbe50 | 2009-06-21 17:56:51 +1000 | [diff] [blame] | 335 | After the chroot, |
| 336 | .Xr sshd 8 |
| 337 | changes the working directory to the user's home directory. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 338 | .Pp |
Darren Tucker | b8c884a | 2010-01-08 18:53:43 +1100 | [diff] [blame] | 339 | The pathname may contain the following tokens that are expanded at runtime once |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 340 | the connecting user has been authenticated: %% is replaced by a literal '%', |
| 341 | %h is replaced by the home directory of the user being authenticated, and |
| 342 | %u is replaced by the username of that user. |
| 343 | .Pp |
| 344 | The |
| 345 | .Cm ChrootDirectory |
| 346 | must contain the necessary files and directories to support the |
Darren Tucker | af501cf | 2009-06-21 17:53:04 +1000 | [diff] [blame] | 347 | user's session. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 348 | For an interactive session this requires at least a shell, typically |
| 349 | .Xr sh 1 , |
| 350 | and basic |
| 351 | .Pa /dev |
| 352 | nodes such as |
| 353 | .Xr null 4 , |
| 354 | .Xr zero 4 , |
| 355 | .Xr stdin 4 , |
| 356 | .Xr stdout 4 , |
| 357 | .Xr stderr 4 , |
jmc@openbsd.org | 08c0eeb | 2014-11-22 19:21:03 +0000 | [diff] [blame] | 358 | and |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 359 | .Xr tty 4 |
| 360 | devices. |
| 361 | For file transfer sessions using |
Darren Tucker | f92077f | 2009-06-21 17:56:25 +1000 | [diff] [blame] | 362 | .Dq sftp , |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 363 | no additional configuration of the environment is necessary if the |
Darren Tucker | f92077f | 2009-06-21 17:56:25 +1000 | [diff] [blame] | 364 | in-process sftp server is used, |
Damien Miller | 426117b | 2014-07-30 12:33:20 +1000 | [diff] [blame] | 365 | though sessions which use logging may require |
Darren Tucker | 00fcd71 | 2009-06-21 17:56:00 +1000 | [diff] [blame] | 366 | .Pa /dev/log |
Damien Miller | 426117b | 2014-07-30 12:33:20 +1000 | [diff] [blame] | 367 | inside the chroot directory on some operating systems (see |
Darren Tucker | 00fcd71 | 2009-06-21 17:56:00 +1000 | [diff] [blame] | 368 | .Xr sftp-server 8 |
| 369 | for details). |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 370 | .Pp |
| 371 | The default is not to |
| 372 | .Xr chroot 2 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 373 | .It Cm Ciphers |
| 374 | Specifies the ciphers allowed for protocol version 2. |
| 375 | Multiple ciphers must be comma-separated. |
Damien Miller | 0fde8ac | 2013-11-21 14:12:23 +1100 | [diff] [blame] | 376 | The supported ciphers are: |
| 377 | .Pp |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 378 | .Bl -item -compact -offset indent |
| 379 | .It |
| 380 | 3des-cbc |
| 381 | .It |
| 382 | aes128-cbc |
| 383 | .It |
| 384 | aes192-cbc |
| 385 | .It |
| 386 | aes256-cbc |
| 387 | .It |
| 388 | aes128-ctr |
| 389 | .It |
| 390 | aes192-ctr |
| 391 | .It |
| 392 | aes256-ctr |
| 393 | .It |
| 394 | aes128-gcm@openssh.com |
| 395 | .It |
| 396 | aes256-gcm@openssh.com |
| 397 | .It |
| 398 | arcfour |
| 399 | .It |
| 400 | arcfour128 |
| 401 | .It |
| 402 | arcfour256 |
| 403 | .It |
| 404 | blowfish-cbc |
| 405 | .It |
| 406 | cast128-cbc |
| 407 | .It |
| 408 | chacha20-poly1305@openssh.com |
| 409 | .El |
Damien Miller | 0fde8ac | 2013-11-21 14:12:23 +1100 | [diff] [blame] | 410 | .Pp |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 411 | The default is: |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 412 | .Bd -literal -offset indent |
| 413 | aes128-ctr,aes192-ctr,aes256-ctr, |
Damien Miller | 1d75abf | 2013-01-09 16:12:19 +1100 | [diff] [blame] | 414 | aes128-gcm@openssh.com,aes256-gcm@openssh.com, |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 415 | chacha20-poly1305@openssh.com |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 416 | .Ed |
Damien Miller | 0fde8ac | 2013-11-21 14:12:23 +1100 | [diff] [blame] | 417 | .Pp |
| 418 | The list of available ciphers may also be obtained using the |
| 419 | .Fl Q |
| 420 | option of |
djm@openbsd.org | 8f6784f | 2014-12-22 09:05:17 +0000 | [diff] [blame] | 421 | .Xr ssh 1 |
| 422 | with an argument of |
| 423 | .Dq cipher . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 424 | .It Cm ClientAliveCountMax |
Damien Miller | b797770 | 2006-01-03 18:47:31 +1100 | [diff] [blame] | 425 | Sets the number of client alive messages (see below) which may be |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 426 | sent without |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 427 | .Xr sshd 8 |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 428 | receiving any messages back from the client. |
| 429 | If this threshold is reached while client alive messages are being sent, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 430 | sshd will disconnect the client, terminating the session. |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 431 | It is important to note that the use of client alive messages is very |
| 432 | different from |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 433 | .Cm TCPKeepAlive |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 434 | (below). |
| 435 | The client alive messages are sent through the encrypted channel |
| 436 | and therefore will not be spoofable. |
| 437 | The TCP keepalive option enabled by |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 438 | .Cm TCPKeepAlive |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 439 | is spoofable. |
| 440 | The client alive mechanism is valuable when the client or |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 441 | server depend on knowing when a connection has become inactive. |
| 442 | .Pp |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 443 | The default value is 3. |
| 444 | If |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 445 | .Cm ClientAliveInterval |
Damien Miller | b797770 | 2006-01-03 18:47:31 +1100 | [diff] [blame] | 446 | (see below) is set to 15, and |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 447 | .Cm ClientAliveCountMax |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 448 | is left at the default, unresponsive SSH clients |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 449 | will be disconnected after approximately 45 seconds. |
Damien Miller | cc3e8ba | 2006-03-15 12:06:55 +1100 | [diff] [blame] | 450 | This option applies to protocol version 2 only. |
Damien Miller | 1594ad5 | 2005-05-26 12:12:19 +1000 | [diff] [blame] | 451 | .It Cm ClientAliveInterval |
| 452 | Sets a timeout interval in seconds after which if no data has been received |
| 453 | from the client, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 454 | .Xr sshd 8 |
Damien Miller | 1594ad5 | 2005-05-26 12:12:19 +1000 | [diff] [blame] | 455 | will send a message through the encrypted |
| 456 | channel to request a response from the client. |
| 457 | The default |
| 458 | is 0, indicating that these messages will not be sent to the client. |
| 459 | This option applies to protocol version 2 only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 460 | .It Cm Compression |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 461 | Specifies whether compression is allowed, or delayed until |
| 462 | the user has authenticated successfully. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 463 | The argument must be |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 464 | .Dq yes , |
| 465 | .Dq delayed , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 466 | or |
| 467 | .Dq no . |
| 468 | The default is |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 469 | .Dq delayed . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 470 | .It Cm DenyGroups |
| 471 | This keyword can be followed by a list of group name patterns, separated |
| 472 | by spaces. |
| 473 | Login is disallowed for users whose primary group or supplementary |
| 474 | group list matches one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 475 | Only group names are valid; a numerical group ID is not recognized. |
| 476 | By default, login is allowed for all groups. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 477 | The allow/deny directives are processed in the following order: |
| 478 | .Cm DenyUsers , |
| 479 | .Cm AllowUsers , |
| 480 | .Cm DenyGroups , |
| 481 | and finally |
| 482 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 483 | .Pp |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 484 | See PATTERNS in |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 485 | .Xr ssh_config 5 |
| 486 | for more information on patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 487 | .It Cm DenyUsers |
| 488 | This keyword can be followed by a list of user name patterns, separated |
| 489 | by spaces. |
| 490 | Login is disallowed for user names that match one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 491 | Only user names are valid; a numerical user ID is not recognized. |
| 492 | By default, login is allowed for all users. |
| 493 | If the pattern takes the form USER@HOST then USER and HOST |
| 494 | are separately checked, restricting logins to particular |
| 495 | users from particular hosts. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 496 | The allow/deny directives are processed in the following order: |
| 497 | .Cm DenyUsers , |
| 498 | .Cm AllowUsers , |
| 499 | .Cm DenyGroups , |
| 500 | and finally |
| 501 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 502 | .Pp |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 503 | See PATTERNS in |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 504 | .Xr ssh_config 5 |
| 505 | for more information on patterns. |
djm@openbsd.org | 56d1c83 | 2014-12-21 22:27:55 +0000 | [diff] [blame] | 506 | .It Cm FingerprintHash |
| 507 | Specifies the hash algorithm used when logging key fingerprints. |
| 508 | Valid options are: |
| 509 | .Dq md5 |
| 510 | and |
| 511 | .Dq sha256 . |
| 512 | The default is |
| 513 | .Dq sha256 . |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 514 | .It Cm ForceCommand |
| 515 | Forces the execution of the command specified by |
| 516 | .Cm ForceCommand , |
Damien Miller | a1b48cc | 2008-03-27 11:02:02 +1100 | [diff] [blame] | 517 | ignoring any command supplied by the client and |
| 518 | .Pa ~/.ssh/rc |
| 519 | if present. |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 520 | The command is invoked by using the user's login shell with the -c option. |
| 521 | This applies to shell, command, or subsystem execution. |
| 522 | It is most useful inside a |
| 523 | .Cm Match |
| 524 | block. |
| 525 | The command originally supplied by the client is available in the |
| 526 | .Ev SSH_ORIGINAL_COMMAND |
| 527 | environment variable. |
Damien Miller | cdb6e65 | 2008-02-10 22:47:24 +1100 | [diff] [blame] | 528 | Specifying a command of |
| 529 | .Dq internal-sftp |
| 530 | will force the use of an in-process sftp server that requires no support |
| 531 | files when used with |
| 532 | .Cm ChrootDirectory . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 533 | .It Cm GatewayPorts |
| 534 | Specifies whether remote hosts are allowed to connect to ports |
| 535 | forwarded for the client. |
| 536 | By default, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 537 | .Xr sshd 8 |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 538 | binds remote port forwardings to the loopback address. |
| 539 | This prevents other remote hosts from connecting to forwarded ports. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 540 | .Cm GatewayPorts |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 541 | can be used to specify that sshd |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 542 | should allow remote port forwardings to bind to non-loopback addresses, thus |
| 543 | allowing other hosts to connect. |
| 544 | The argument may be |
| 545 | .Dq no |
| 546 | 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] | 547 | .Dq yes |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 548 | to force remote port forwardings to bind to the wildcard address, or |
| 549 | .Dq clientspecified |
| 550 | 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] | 551 | The default is |
| 552 | .Dq no . |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 553 | .It Cm GSSAPIAuthentication |
Damien Miller | 9b7b03b | 2003-09-02 22:57:05 +1000 | [diff] [blame] | 554 | Specifies whether user authentication based on GSSAPI is allowed. |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 555 | The default is |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 556 | .Dq no . |
| 557 | Note that this option applies to protocol version 2 only. |
| 558 | .It Cm GSSAPICleanupCredentials |
| 559 | Specifies whether to automatically destroy the user's credentials cache |
| 560 | on logout. |
| 561 | The default is |
| 562 | .Dq yes . |
| 563 | Note that this option applies to protocol version 2 only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 564 | .It Cm HostbasedAuthentication |
| 565 | Specifies whether rhosts or /etc/hosts.equiv authentication together |
| 566 | with successful public key client host authentication is allowed |
Damien Miller | 1faa713 | 2006-03-15 11:55:31 +1100 | [diff] [blame] | 567 | (host-based authentication). |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 568 | This option is similar to |
| 569 | .Cm RhostsRSAAuthentication |
| 570 | and applies to protocol version 2 only. |
| 571 | The default is |
| 572 | .Dq no . |
Damien Miller | b594f38 | 2006-08-30 11:06:34 +1000 | [diff] [blame] | 573 | .It Cm HostbasedUsesNameFromPacketOnly |
| 574 | Specifies whether or not the server will attempt to perform a reverse |
| 575 | name lookup when matching the name in the |
| 576 | .Pa ~/.shosts , |
| 577 | .Pa ~/.rhosts , |
| 578 | and |
| 579 | .Pa /etc/hosts.equiv |
| 580 | files during |
| 581 | .Cm HostbasedAuthentication . |
| 582 | A setting of |
| 583 | .Dq yes |
| 584 | means that |
| 585 | .Xr sshd 8 |
| 586 | uses the name supplied by the client rather than |
| 587 | attempting to resolve the name from the TCP connection itself. |
| 588 | The default is |
| 589 | .Dq no . |
Damien Miller | 0a80ca1 | 2010-02-27 07:55:05 +1100 | [diff] [blame] | 590 | .It Cm HostCertificate |
| 591 | Specifies a file containing a public host certificate. |
| 592 | The certificate's public key must match a private host key already specified |
| 593 | by |
| 594 | .Cm HostKey . |
| 595 | The default behaviour of |
| 596 | .Xr sshd 8 |
| 597 | is not to load any certificates. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 598 | .It Cm HostKey |
| 599 | Specifies a file containing a private host key |
| 600 | used by SSH. |
| 601 | The default is |
| 602 | .Pa /etc/ssh/ssh_host_key |
| 603 | for protocol version 1, and |
Damien Miller | eb8b60e | 2010-08-31 22:41:14 +1000 | [diff] [blame] | 604 | .Pa /etc/ssh/ssh_host_dsa_key , |
Damien Miller | 8ba0ead | 2013-12-18 17:46:27 +1100 | [diff] [blame] | 605 | .Pa /etc/ssh/ssh_host_ecdsa_key , |
| 606 | .Pa /etc/ssh/ssh_host_ed25519_key |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 607 | and |
Damien Miller | eb8b60e | 2010-08-31 22:41:14 +1000 | [diff] [blame] | 608 | .Pa /etc/ssh/ssh_host_rsa_key |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 609 | for protocol version 2. |
| 610 | Note that |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 611 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 612 | will refuse to use a file if it is group/world-accessible. |
| 613 | It is possible to have multiple host key files. |
| 614 | .Dq rsa1 |
| 615 | keys are used for version 1 and |
Damien Miller | eb8b60e | 2010-08-31 22:41:14 +1000 | [diff] [blame] | 616 | .Dq dsa , |
Damien Miller | 8ba0ead | 2013-12-18 17:46:27 +1100 | [diff] [blame] | 617 | .Dq ecdsa , |
| 618 | .Dq ed25519 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 619 | or |
| 620 | .Dq rsa |
| 621 | are used for version 2 of the SSH protocol. |
Damien Miller | 85b45e0 | 2013-07-20 13:21:52 +1000 | [diff] [blame] | 622 | It is also possible to specify public host key files instead. |
| 623 | In this case operations on the private key will be delegated |
| 624 | to an |
| 625 | .Xr ssh-agent 1 . |
| 626 | .It Cm HostKeyAgent |
| 627 | Identifies the UNIX-domain socket used to communicate |
| 628 | with an agent that has access to the private host keys. |
| 629 | If |
| 630 | .Dq SSH_AUTH_SOCK |
| 631 | is specified, the location of the socket will be read from the |
| 632 | .Ev SSH_AUTH_SOCK |
| 633 | environment variable. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 634 | .It Cm IgnoreRhosts |
| 635 | Specifies that |
| 636 | .Pa .rhosts |
| 637 | and |
| 638 | .Pa .shosts |
| 639 | files will not be used in |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 640 | .Cm RhostsRSAAuthentication |
| 641 | or |
| 642 | .Cm HostbasedAuthentication . |
| 643 | .Pp |
| 644 | .Pa /etc/hosts.equiv |
| 645 | and |
| 646 | .Pa /etc/shosts.equiv |
| 647 | are still used. |
| 648 | The default is |
| 649 | .Dq yes . |
| 650 | .It Cm IgnoreUserKnownHosts |
| 651 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 652 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 653 | should ignore the user's |
Damien Miller | 167ea5d | 2005-05-26 12:04:02 +1000 | [diff] [blame] | 654 | .Pa ~/.ssh/known_hosts |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 655 | during |
| 656 | .Cm RhostsRSAAuthentication |
| 657 | or |
| 658 | .Cm HostbasedAuthentication . |
| 659 | The default is |
| 660 | .Dq no . |
Damien Miller | 0dac6fb | 2010-11-20 15:19:38 +1100 | [diff] [blame] | 661 | .It Cm IPQoS |
| 662 | Specifies the IPv4 type-of-service or DSCP class for the connection. |
| 663 | Accepted values are |
| 664 | .Dq af11 , |
| 665 | .Dq af12 , |
| 666 | .Dq af13 , |
Damien Miller | f6e758c | 2011-09-22 21:37:13 +1000 | [diff] [blame] | 667 | .Dq af21 , |
Damien Miller | 0dac6fb | 2010-11-20 15:19:38 +1100 | [diff] [blame] | 668 | .Dq af22 , |
| 669 | .Dq af23 , |
| 670 | .Dq af31 , |
| 671 | .Dq af32 , |
| 672 | .Dq af33 , |
| 673 | .Dq af41 , |
| 674 | .Dq af42 , |
| 675 | .Dq af43 , |
| 676 | .Dq cs0 , |
| 677 | .Dq cs1 , |
| 678 | .Dq cs2 , |
| 679 | .Dq cs3 , |
| 680 | .Dq cs4 , |
| 681 | .Dq cs5 , |
| 682 | .Dq cs6 , |
| 683 | .Dq cs7 , |
| 684 | .Dq ef , |
| 685 | .Dq lowdelay , |
| 686 | .Dq throughput , |
| 687 | .Dq reliability , |
| 688 | or a numeric value. |
Damien Miller | 928362d | 2010-12-26 14:26:45 +1100 | [diff] [blame] | 689 | This option may take one or two arguments, separated by whitespace. |
Damien Miller | 0dac6fb | 2010-11-20 15:19:38 +1100 | [diff] [blame] | 690 | If one argument is specified, it is used as the packet class unconditionally. |
| 691 | If two values are specified, the first is automatically selected for |
| 692 | interactive sessions and the second for non-interactive sessions. |
| 693 | The default is |
| 694 | .Dq lowdelay |
| 695 | for interactive sessions and |
| 696 | .Dq throughput |
| 697 | for non-interactive sessions. |
Damien Miller | e1e480a | 2014-02-04 11:13:17 +1100 | [diff] [blame] | 698 | .It Cm KbdInteractiveAuthentication |
| 699 | Specifies whether to allow keyboard-interactive authentication. |
| 700 | The argument to this keyword must be |
| 701 | .Dq yes |
| 702 | or |
| 703 | .Dq no . |
| 704 | The default is to use whatever value |
| 705 | .Cm ChallengeResponseAuthentication |
| 706 | is set to |
| 707 | (by default |
| 708 | .Dq yes ) . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 709 | .It Cm KerberosAuthentication |
Damien Miller | 1a0c0b9 | 2003-09-02 22:51:17 +1000 | [diff] [blame] | 710 | Specifies whether the password provided by the user for |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 711 | .Cm PasswordAuthentication |
Damien Miller | 1a0c0b9 | 2003-09-02 22:51:17 +1000 | [diff] [blame] | 712 | will be validated through the Kerberos KDC. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 713 | To use this option, the server needs a |
| 714 | Kerberos servtab which allows the verification of the KDC's identity. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 715 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 716 | .Dq no . |
Damien Miller | 8448e66 | 2004-03-08 23:13:15 +1100 | [diff] [blame] | 717 | .It Cm KerberosGetAFSToken |
Darren Tucker | e2dd2d5 | 2005-10-03 18:19:06 +1000 | [diff] [blame] | 718 | 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] | 719 | an AFS token before accessing the user's home directory. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 720 | The default is |
Damien Miller | 8448e66 | 2004-03-08 23:13:15 +1100 | [diff] [blame] | 721 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 722 | .It Cm KerberosOrLocalPasswd |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 723 | If password authentication through Kerberos fails then |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 724 | the password will be validated via any additional local mechanism |
| 725 | such as |
| 726 | .Pa /etc/passwd . |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 727 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 728 | .Dq yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 729 | .It Cm KerberosTicketCleanup |
| 730 | Specifies whether to automatically destroy the user's ticket cache |
| 731 | file on logout. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 732 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 733 | .Dq yes . |
Damien Miller | d5f62bf | 2010-09-24 22:11:14 +1000 | [diff] [blame] | 734 | .It Cm KexAlgorithms |
| 735 | Specifies the available KEX (Key Exchange) algorithms. |
| 736 | Multiple algorithms must be comma-separated. |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 737 | The supported algorithms are: |
| 738 | .Pp |
| 739 | .Bl -item -compact -offset indent |
| 740 | .It |
| 741 | curve25519-sha256@libssh.org |
| 742 | .It |
| 743 | diffie-hellman-group1-sha1 |
| 744 | .It |
| 745 | diffie-hellman-group14-sha1 |
| 746 | .It |
| 747 | diffie-hellman-group-exchange-sha1 |
| 748 | .It |
| 749 | diffie-hellman-group-exchange-sha256 |
| 750 | .It |
| 751 | ecdh-sha2-nistp256 |
| 752 | .It |
| 753 | ecdh-sha2-nistp384 |
| 754 | .It |
| 755 | ecdh-sha2-nistp521 |
| 756 | .El |
| 757 | .Pp |
| 758 | The default is: |
Damien Miller | 6575c3a | 2013-12-18 17:47:02 +1100 | [diff] [blame] | 759 | .Bd -literal -offset indent |
| 760 | curve25519-sha256@libssh.org, |
| 761 | ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, |
| 762 | diffie-hellman-group-exchange-sha256, |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 763 | diffie-hellman-group14-sha1 |
Damien Miller | 6575c3a | 2013-12-18 17:47:02 +1100 | [diff] [blame] | 764 | .Ed |
djm@openbsd.org | 8f6784f | 2014-12-22 09:05:17 +0000 | [diff] [blame] | 765 | .Pp |
| 766 | The list of available key exchange algorithms may also be obtained using the |
| 767 | .Fl Q |
| 768 | option of |
| 769 | .Xr ssh 1 |
| 770 | with an argument of |
| 771 | .Dq kex . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 772 | .It Cm KeyRegenerationInterval |
| 773 | In protocol version 1, the ephemeral server key is automatically regenerated |
| 774 | after this many seconds (if it has been used). |
| 775 | The purpose of regeneration is to prevent |
| 776 | decrypting captured sessions by later breaking into the machine and |
| 777 | stealing the keys. |
| 778 | The key is never stored anywhere. |
| 779 | If the value is 0, the key is never regenerated. |
| 780 | The default is 3600 (seconds). |
| 781 | .It Cm ListenAddress |
| 782 | Specifies the local addresses |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 783 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 784 | should listen on. |
| 785 | The following forms may be used: |
| 786 | .Pp |
| 787 | .Bl -item -offset indent -compact |
| 788 | .It |
| 789 | .Cm ListenAddress |
| 790 | .Sm off |
jmc@openbsd.org | 08c0eeb | 2014-11-22 19:21:03 +0000 | [diff] [blame] | 791 | .Ar host | Ar IPv4_addr | Ar IPv6_addr |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 792 | .Sm on |
| 793 | .It |
| 794 | .Cm ListenAddress |
| 795 | .Sm off |
jmc@openbsd.org | 08c0eeb | 2014-11-22 19:21:03 +0000 | [diff] [blame] | 796 | .Ar host | Ar IPv4_addr : Ar port |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 797 | .Sm on |
| 798 | .It |
| 799 | .Cm ListenAddress |
| 800 | .Sm off |
| 801 | .Oo |
jmc@openbsd.org | 08c0eeb | 2014-11-22 19:21:03 +0000 | [diff] [blame] | 802 | .Ar host | Ar IPv6_addr Oc : Ar port |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 803 | .Sm on |
| 804 | .El |
| 805 | .Pp |
| 806 | If |
| 807 | .Ar port |
| 808 | is not specified, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 809 | sshd will listen on the address and all prior |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 810 | .Cm Port |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 811 | options specified. |
| 812 | The default is to listen on all local addresses. |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 813 | Multiple |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 814 | .Cm ListenAddress |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 815 | options are permitted. |
| 816 | Additionally, any |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 817 | .Cm Port |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 818 | options must precede this option for non-port qualified addresses. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 819 | .It Cm LoginGraceTime |
| 820 | The server disconnects after this time if the user has not |
| 821 | successfully logged in. |
| 822 | If the value is 0, there is no time limit. |
Damien Miller | c134863 | 2002-09-05 14:35:14 +1000 | [diff] [blame] | 823 | The default is 120 seconds. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 824 | .It Cm LogLevel |
| 825 | Gives the verbosity level that is used when logging messages from |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 826 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 827 | The possible values are: |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 828 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 829 | The default is INFO. |
| 830 | DEBUG and DEBUG1 are equivalent. |
| 831 | DEBUG2 and DEBUG3 each specify higher levels of debugging output. |
| 832 | 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] | 833 | .It Cm MACs |
| 834 | Specifies the available MAC (message authentication code) algorithms. |
| 835 | The MAC algorithm is used in protocol version 2 |
| 836 | for data integrity protection. |
| 837 | Multiple algorithms must be comma-separated. |
Damien Miller | af43a7a | 2012-12-12 10:46:31 +1100 | [diff] [blame] | 838 | The algorithms that contain |
| 839 | .Dq -etm |
| 840 | calculate the MAC after encryption (encrypt-then-mac). |
| 841 | These are considered safer and their use recommended. |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 842 | The supported MACs are: |
| 843 | .Pp |
| 844 | .Bl -item -compact -offset indent |
| 845 | .It |
| 846 | hmac-md5 |
| 847 | .It |
| 848 | hmac-md5-96 |
| 849 | .It |
| 850 | hmac-ripemd160 |
| 851 | .It |
| 852 | hmac-sha1 |
| 853 | .It |
| 854 | hmac-sha1-96 |
| 855 | .It |
| 856 | hmac-sha2-256 |
| 857 | .It |
| 858 | hmac-sha2-512 |
| 859 | .It |
| 860 | umac-64@openssh.com |
| 861 | .It |
| 862 | umac-128@openssh.com |
| 863 | .It |
| 864 | hmac-md5-etm@openssh.com |
| 865 | .It |
| 866 | hmac-md5-96-etm@openssh.com |
| 867 | .It |
| 868 | hmac-ripemd160-etm@openssh.com |
| 869 | .It |
| 870 | hmac-sha1-etm@openssh.com |
| 871 | .It |
| 872 | hmac-sha1-96-etm@openssh.com |
| 873 | .It |
| 874 | hmac-sha2-256-etm@openssh.com |
| 875 | .It |
| 876 | hmac-sha2-512-etm@openssh.com |
| 877 | .It |
| 878 | umac-64-etm@openssh.com |
| 879 | .It |
| 880 | umac-128-etm@openssh.com |
| 881 | .El |
| 882 | .Pp |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 883 | The default is: |
Damien Miller | 22b7b49 | 2007-06-11 14:07:12 +1000 | [diff] [blame] | 884 | .Bd -literal -offset indent |
Damien Miller | af43a7a | 2012-12-12 10:46:31 +1100 | [diff] [blame] | 885 | umac-64-etm@openssh.com,umac-128-etm@openssh.com, |
| 886 | hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com, |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 887 | umac-64@openssh.com,umac-128@openssh.com, |
| 888 | hmac-sha2-256,hmac-sha2-512 |
Damien Miller | 22b7b49 | 2007-06-11 14:07:12 +1000 | [diff] [blame] | 889 | .Ed |
djm@openbsd.org | 8f6784f | 2014-12-22 09:05:17 +0000 | [diff] [blame] | 890 | .Pp |
| 891 | The list of available MAC algorithms may also be obtained using the |
| 892 | .Fl Q |
| 893 | option of |
| 894 | .Xr ssh 1 |
| 895 | with an argument of |
| 896 | .Dq mac . |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 897 | .It Cm Match |
Damien Miller | d04f357 | 2006-07-24 13:46:50 +1000 | [diff] [blame] | 898 | Introduces a conditional block. |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 899 | If all of the criteria on the |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 900 | .Cm Match |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 901 | line are satisfied, the keywords on the following lines override those |
| 902 | set in the global section of the config file, until either another |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 903 | .Cm Match |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 904 | line or the end of the file. |
Damien Miller | fc5d675 | 2014-02-28 10:01:28 +1100 | [diff] [blame] | 905 | If a keyword appears in multiple |
| 906 | .Cm Match |
sobrado@openbsd.org | 180bcb4 | 2014-08-30 16:32:25 +0000 | [diff] [blame] | 907 | blocks that are satisfied, only the first instance of the keyword is |
Damien Miller | fc5d675 | 2014-02-28 10:01:28 +1100 | [diff] [blame] | 908 | applied. |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 909 | .Pp |
Damien Miller | d04f357 | 2006-07-24 13:46:50 +1000 | [diff] [blame] | 910 | The arguments to |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 911 | .Cm Match |
Damien Miller | cf31f38 | 2013-10-24 21:02:56 +1100 | [diff] [blame] | 912 | are one or more criteria-pattern pairs or the single token |
| 913 | .Cm All |
| 914 | which matches all criteria. |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 915 | The available criteria are |
| 916 | .Cm User , |
Damien Miller | 565ca3f | 2006-08-19 00:23:15 +1000 | [diff] [blame] | 917 | .Cm Group , |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 918 | .Cm Host , |
Darren Tucker | fbcf827 | 2012-05-19 19:37:01 +1000 | [diff] [blame] | 919 | .Cm LocalAddress , |
| 920 | .Cm LocalPort , |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 921 | and |
| 922 | .Cm Address . |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 923 | The match patterns may consist of single entries or comma-separated |
| 924 | lists and may use the wildcard and negation operators described in the |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 925 | PATTERNS section of |
Darren Tucker | b06cc4a | 2008-06-10 22:59:53 +1000 | [diff] [blame] | 926 | .Xr ssh_config 5 . |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 927 | .Pp |
| 928 | The patterns in an |
| 929 | .Cm Address |
| 930 | criteria may additionally contain addresses to match in CIDR |
Darren Tucker | 6a2a400 | 2008-06-10 23:03:04 +1000 | [diff] [blame] | 931 | address/masklen format, e.g.\& |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 932 | .Dq 192.0.2.0/24 |
| 933 | or |
| 934 | .Dq 3ffe:ffff::/32 . |
| 935 | Note that the mask length provided must be consistent with the address - |
| 936 | it is an error to specify a mask length that is too long for the address |
Darren Tucker | 6a2a400 | 2008-06-10 23:03:04 +1000 | [diff] [blame] | 937 | or one with bits set in this host portion of the address. |
| 938 | For example, |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 939 | .Dq 192.0.2.0/33 |
| 940 | and |
Darren Tucker | 6a2a400 | 2008-06-10 23:03:04 +1000 | [diff] [blame] | 941 | .Dq 192.0.2.0/8 |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 942 | respectively. |
| 943 | .Pp |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 944 | Only a subset of keywords may be used on the lines following a |
| 945 | .Cm Match |
| 946 | keyword. |
| 947 | Available keywords are |
Damien Miller | f826850 | 2012-06-20 21:54:15 +1000 | [diff] [blame] | 948 | .Cm AcceptEnv , |
Damien Miller | 1781901 | 2009-01-28 16:20:17 +1100 | [diff] [blame] | 949 | .Cm AllowAgentForwarding , |
Damien Miller | f826850 | 2012-06-20 21:54:15 +1000 | [diff] [blame] | 950 | .Cm AllowGroups , |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 951 | .Cm AllowTcpForwarding , |
Damien Miller | c24da77 | 2012-06-20 21:53:58 +1000 | [diff] [blame] | 952 | .Cm AllowUsers , |
Damien Miller | a6e3f01 | 2012-11-04 23:21:40 +1100 | [diff] [blame] | 953 | .Cm AuthenticationMethods , |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 954 | .Cm AuthorizedKeysCommand , |
| 955 | .Cm AuthorizedKeysCommandUser , |
Damien Miller | f33580e | 2012-11-04 22:22:52 +1100 | [diff] [blame] | 956 | .Cm AuthorizedKeysFile , |
Damien Miller | ab6de35 | 2010-06-26 09:38:45 +1000 | [diff] [blame] | 957 | .Cm AuthorizedPrincipalsFile , |
Darren Tucker | 1629c07 | 2007-02-19 22:25:37 +1100 | [diff] [blame] | 958 | .Cm Banner , |
Damien Miller | 797e3d1 | 2008-05-19 14:27:42 +1000 | [diff] [blame] | 959 | .Cm ChrootDirectory , |
Damien Miller | c24da77 | 2012-06-20 21:53:58 +1000 | [diff] [blame] | 960 | .Cm DenyGroups , |
| 961 | .Cm DenyUsers , |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 962 | .Cm ForceCommand , |
Damien Miller | c24da77 | 2012-06-20 21:53:58 +1000 | [diff] [blame] | 963 | .Cm GatewayPorts , |
Damien Miller | f826850 | 2012-06-20 21:54:15 +1000 | [diff] [blame] | 964 | .Cm GSSAPIAuthentication , |
Damien Miller | 25434de | 2008-05-19 14:29:08 +1000 | [diff] [blame] | 965 | .Cm HostbasedAuthentication , |
Damien Miller | ab6de35 | 2010-06-26 09:38:45 +1000 | [diff] [blame] | 966 | .Cm HostbasedUsesNameFromPacketOnly , |
Darren Tucker | 1d75f22 | 2007-03-01 21:31:28 +1100 | [diff] [blame] | 967 | .Cm KbdInteractiveAuthentication , |
Damien Miller | 5737e36 | 2007-03-06 21:21:18 +1100 | [diff] [blame] | 968 | .Cm KerberosAuthentication , |
Damien Miller | 307c1d1 | 2008-06-16 07:56:20 +1000 | [diff] [blame] | 969 | .Cm MaxAuthTries , |
Damien Miller | c62a5af | 2008-06-16 07:55:46 +1000 | [diff] [blame] | 970 | .Cm MaxSessions , |
Darren Tucker | 1629c07 | 2007-02-19 22:25:37 +1100 | [diff] [blame] | 971 | .Cm PasswordAuthentication , |
Damien Miller | 51bde60 | 2008-11-03 19:23:10 +1100 | [diff] [blame] | 972 | .Cm PermitEmptyPasswords , |
Damien Miller | d1de995 | 2006-07-24 14:05:48 +1000 | [diff] [blame] | 973 | .Cm PermitOpen , |
Darren Tucker | 15f9427 | 2008-01-01 20:36:56 +1100 | [diff] [blame] | 974 | .Cm PermitRootLogin , |
Damien Miller | 5ff30c6 | 2013-10-30 22:21:50 +1100 | [diff] [blame] | 975 | .Cm PermitTTY , |
Damien Miller | ab6de35 | 2010-06-26 09:38:45 +1000 | [diff] [blame] | 976 | .Cm PermitTunnel , |
Damien Miller | 72e6b5c | 2014-07-04 09:00:04 +1000 | [diff] [blame] | 977 | .Cm PermitUserRC , |
Darren Tucker | 1477ea1 | 2009-10-07 08:36:05 +1100 | [diff] [blame] | 978 | .Cm PubkeyAuthentication , |
Darren Tucker | 5f96f3b | 2013-05-16 20:29:28 +1000 | [diff] [blame] | 979 | .Cm RekeyLimit , |
Damien Miller | c24da77 | 2012-06-20 21:53:58 +1000 | [diff] [blame] | 980 | .Cm RhostsRSAAuthentication , |
Damien Miller | f826850 | 2012-06-20 21:54:15 +1000 | [diff] [blame] | 981 | .Cm RSAAuthentication , |
Damien Miller | d1de995 | 2006-07-24 14:05:48 +1000 | [diff] [blame] | 982 | .Cm X11DisplayOffset , |
Damien Miller | 1991384 | 2009-02-23 10:53:58 +1100 | [diff] [blame] | 983 | .Cm X11Forwarding |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 984 | and |
Damien Miller | 0296ae8 | 2009-02-23 11:00:24 +1100 | [diff] [blame] | 985 | .Cm X11UseLocalHost . |
Darren Tucker | 89413db | 2004-05-24 10:36:23 +1000 | [diff] [blame] | 986 | .It Cm MaxAuthTries |
| 987 | Specifies the maximum number of authentication attempts permitted per |
Damien Miller | 26213e5 | 2004-06-30 22:39:34 +1000 | [diff] [blame] | 988 | connection. |
| 989 | Once the number of failures reaches half this value, |
| 990 | additional failures are logged. |
| 991 | The default is 6. |
Damien Miller | 7207f64 | 2008-05-19 15:34:50 +1000 | [diff] [blame] | 992 | .It Cm MaxSessions |
| 993 | Specifies the maximum number of open sessions permitted per network connection. |
| 994 | The default is 10. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 995 | .It Cm MaxStartups |
| 996 | Specifies the maximum number of concurrent unauthenticated connections to the |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 997 | SSH daemon. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 998 | Additional connections will be dropped until authentication succeeds or the |
| 999 | .Cm LoginGraceTime |
| 1000 | expires for a connection. |
Damien Miller | 1f583df | 2013-02-12 11:02:08 +1100 | [diff] [blame] | 1001 | The default is 10:30:100. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1002 | .Pp |
| 1003 | Alternatively, random early drop can be enabled by specifying |
| 1004 | the three colon separated values |
| 1005 | .Dq start:rate:full |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 1006 | (e.g. "10:30:60"). |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1007 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1008 | will refuse connection attempts with a probability of |
| 1009 | .Dq rate/100 |
| 1010 | (30%) |
| 1011 | if there are currently |
| 1012 | .Dq start |
| 1013 | (10) |
| 1014 | unauthenticated connections. |
| 1015 | The probability increases linearly and all connection attempts |
| 1016 | are refused if the number of unauthenticated connections reaches |
| 1017 | .Dq full |
| 1018 | (60). |
| 1019 | .It Cm PasswordAuthentication |
| 1020 | Specifies whether password authentication is allowed. |
| 1021 | The default is |
| 1022 | .Dq yes . |
| 1023 | .It Cm PermitEmptyPasswords |
| 1024 | When password authentication is allowed, it specifies whether the |
| 1025 | server allows login to accounts with empty password strings. |
| 1026 | The default is |
| 1027 | .Dq no . |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 1028 | .It Cm PermitOpen |
| 1029 | Specifies the destinations to which TCP port forwarding is permitted. |
| 1030 | The forwarding specification must be one of the following forms: |
| 1031 | .Pp |
| 1032 | .Bl -item -offset indent -compact |
| 1033 | .It |
| 1034 | .Cm PermitOpen |
| 1035 | .Sm off |
| 1036 | .Ar host : port |
| 1037 | .Sm on |
| 1038 | .It |
| 1039 | .Cm PermitOpen |
| 1040 | .Sm off |
| 1041 | .Ar IPv4_addr : port |
| 1042 | .Sm on |
| 1043 | .It |
| 1044 | .Cm PermitOpen |
| 1045 | .Sm off |
| 1046 | .Ar \&[ IPv6_addr \&] : port |
| 1047 | .Sm on |
| 1048 | .El |
| 1049 | .Pp |
Damien Miller | a765cf4 | 2006-07-24 14:08:13 +1000 | [diff] [blame] | 1050 | Multiple forwards may be specified by separating them with whitespace. |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 1051 | An argument of |
| 1052 | .Dq any |
| 1053 | can be used to remove all restrictions and permit any forwarding requests. |
Darren Tucker | ba9ea32 | 2012-05-19 19:37:33 +1000 | [diff] [blame] | 1054 | An argument of |
| 1055 | .Dq none |
| 1056 | can be used to prohibit all forwarding requests. |
Damien Miller | 65bc2c4 | 2006-07-24 14:04:16 +1000 | [diff] [blame] | 1057 | By default all port forwarding requests are permitted. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1058 | .It Cm PermitRootLogin |
Darren Tucker | b350901 | 2005-01-20 11:01:46 +1100 | [diff] [blame] | 1059 | Specifies whether root can log in using |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1060 | .Xr ssh 1 . |
| 1061 | The argument must be |
| 1062 | .Dq yes , |
| 1063 | .Dq without-password , |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1064 | .Dq forced-commands-only , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1065 | or |
| 1066 | .Dq no . |
| 1067 | The default is |
| 1068 | .Dq yes . |
| 1069 | .Pp |
| 1070 | If this option is set to |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1071 | .Dq without-password , |
Darren Tucker | 9dca099 | 2005-02-01 19:16:45 +1100 | [diff] [blame] | 1072 | password authentication is disabled for root. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1073 | .Pp |
| 1074 | If this option is set to |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1075 | .Dq forced-commands-only , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1076 | root login with public key authentication will be allowed, |
| 1077 | but only if the |
| 1078 | .Ar command |
| 1079 | option has been specified |
| 1080 | (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] | 1081 | normally not allowed). |
| 1082 | All other authentication methods are disabled for root. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1083 | .Pp |
| 1084 | If this option is set to |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1085 | .Dq no , |
Darren Tucker | b350901 | 2005-01-20 11:01:46 +1100 | [diff] [blame] | 1086 | root is not allowed to log in. |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 1087 | .It Cm PermitTunnel |
| 1088 | Specifies whether |
| 1089 | .Xr tun 4 |
| 1090 | device forwarding is allowed. |
Damien Miller | 7b58e80 | 2005-12-13 19:33:19 +1100 | [diff] [blame] | 1091 | The argument must be |
| 1092 | .Dq yes , |
Damien Miller | 991dba4 | 2006-07-10 20:16:27 +1000 | [diff] [blame] | 1093 | .Dq point-to-point |
| 1094 | (layer 3), |
| 1095 | .Dq ethernet |
| 1096 | (layer 2), or |
Damien Miller | 7b58e80 | 2005-12-13 19:33:19 +1100 | [diff] [blame] | 1097 | .Dq no . |
Damien Miller | 991dba4 | 2006-07-10 20:16:27 +1000 | [diff] [blame] | 1098 | Specifying |
| 1099 | .Dq yes |
| 1100 | permits both |
| 1101 | .Dq point-to-point |
| 1102 | and |
| 1103 | .Dq ethernet . |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 1104 | The default is |
| 1105 | .Dq no . |
djm@openbsd.org | 48dffd5 | 2014-09-09 09:45:36 +0000 | [diff] [blame] | 1106 | .Pp |
| 1107 | Independent of this setting, the permissions of the selected |
| 1108 | .Xr tun 4 |
| 1109 | device must allow access to the user. |
Damien Miller | 5ff30c6 | 2013-10-30 22:21:50 +1100 | [diff] [blame] | 1110 | .It Cm PermitTTY |
| 1111 | Specifies whether |
Damien Miller | 63857c9 | 2013-10-30 22:31:06 +1100 | [diff] [blame] | 1112 | .Xr pty 4 |
Damien Miller | 5ff30c6 | 2013-10-30 22:21:50 +1100 | [diff] [blame] | 1113 | allocation is permitted. |
| 1114 | The default is |
| 1115 | .Dq yes . |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 1116 | .It Cm PermitUserEnvironment |
| 1117 | Specifies whether |
| 1118 | .Pa ~/.ssh/environment |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 1119 | and |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 1120 | .Cm environment= |
| 1121 | options in |
| 1122 | .Pa ~/.ssh/authorized_keys |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 1123 | are processed by |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1124 | .Xr sshd 8 . |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 1125 | The default is |
| 1126 | .Dq no . |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 1127 | Enabling environment processing may enable users to bypass access |
| 1128 | restrictions in some configurations using mechanisms such as |
| 1129 | .Ev LD_PRELOAD . |
Damien Miller | 72e6b5c | 2014-07-04 09:00:04 +1000 | [diff] [blame] | 1130 | .It Cm PermitUserRC |
| 1131 | Specifies whether any |
| 1132 | .Pa ~/.ssh/rc |
| 1133 | file is executed. |
| 1134 | The default is |
| 1135 | .Dq yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1136 | .It Cm PidFile |
Ben Lindstrom | 959de99 | 2002-06-23 00:35:25 +0000 | [diff] [blame] | 1137 | Specifies the file that contains the process ID of the |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1138 | SSH daemon. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1139 | The default is |
| 1140 | .Pa /var/run/sshd.pid . |
| 1141 | .It Cm Port |
| 1142 | Specifies the port number that |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1143 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1144 | listens on. |
| 1145 | The default is 22. |
| 1146 | Multiple options of this type are permitted. |
| 1147 | See also |
| 1148 | .Cm ListenAddress . |
| 1149 | .It Cm PrintLastLog |
| 1150 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1151 | .Xr sshd 8 |
Darren Tucker | 7cc5c23 | 2004-11-05 20:06:59 +1100 | [diff] [blame] | 1152 | should print the date and time of the last user login when a user logs |
| 1153 | in interactively. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1154 | The default is |
| 1155 | .Dq yes . |
| 1156 | .It Cm PrintMotd |
| 1157 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1158 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1159 | should print |
| 1160 | .Pa /etc/motd |
| 1161 | when a user logs in interactively. |
| 1162 | (On some systems it is also printed by the shell, |
| 1163 | .Pa /etc/profile , |
| 1164 | or equivalent.) |
| 1165 | The default is |
| 1166 | .Dq yes . |
| 1167 | .It Cm Protocol |
| 1168 | Specifies the protocol versions |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1169 | .Xr sshd 8 |
Ben Lindstrom | 9c44554 | 2002-07-11 03:59:18 +0000 | [diff] [blame] | 1170 | supports. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1171 | The possible values are |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1172 | .Sq 1 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1173 | and |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1174 | .Sq 2 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1175 | Multiple versions must be comma-separated. |
| 1176 | The default is |
Darren Tucker | 7a4a765 | 2009-10-11 21:51:40 +1100 | [diff] [blame] | 1177 | .Sq 2 . |
Ben Lindstrom | 9c44554 | 2002-07-11 03:59:18 +0000 | [diff] [blame] | 1178 | Note that the order of the protocol list does not indicate preference, |
| 1179 | because the client selects among multiple protocol versions offered |
| 1180 | by the server. |
| 1181 | Specifying |
| 1182 | .Dq 2,1 |
| 1183 | is identical to |
| 1184 | .Dq 1,2 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1185 | .It Cm PubkeyAuthentication |
| 1186 | Specifies whether public key authentication is allowed. |
| 1187 | The default is |
| 1188 | .Dq yes . |
| 1189 | Note that this option applies to protocol version 2 only. |
Darren Tucker | 5f96f3b | 2013-05-16 20:29:28 +1000 | [diff] [blame] | 1190 | .It Cm RekeyLimit |
| 1191 | Specifies the maximum amount of data that may be transmitted before the |
| 1192 | session key is renegotiated, optionally followed a maximum amount of |
| 1193 | time that may pass before the session key is renegotiated. |
| 1194 | The first argument is specified in bytes and may have a suffix of |
| 1195 | .Sq K , |
| 1196 | .Sq M , |
| 1197 | or |
| 1198 | .Sq G |
| 1199 | to indicate Kilobytes, Megabytes, or Gigabytes, respectively. |
| 1200 | The default is between |
| 1201 | .Sq 1G |
| 1202 | and |
| 1203 | .Sq 4G , |
| 1204 | depending on the cipher. |
| 1205 | The optional second value is specified in seconds and may use any of the |
| 1206 | units documented in the |
| 1207 | .Sx TIME FORMATS |
Darren Tucker | 64d2294 | 2013-05-16 20:31:29 +1000 | [diff] [blame] | 1208 | section. |
Darren Tucker | 5f96f3b | 2013-05-16 20:29:28 +1000 | [diff] [blame] | 1209 | The default value for |
| 1210 | .Cm RekeyLimit |
| 1211 | is |
| 1212 | .Dq default none , |
| 1213 | which means that rekeying is performed after the cipher's default amount |
| 1214 | of data has been sent or received and no time based rekeying is done. |
| 1215 | This option applies to protocol version 2 only. |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1216 | .It Cm RevokedKeys |
Damien Miller | f3747bf | 2013-01-18 11:44:04 +1100 | [diff] [blame] | 1217 | Specifies revoked public keys. |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1218 | Keys listed in this file will be refused for public key authentication. |
| 1219 | Note that if this file is not readable, then public key authentication will |
| 1220 | be refused for all users. |
Damien Miller | f3747bf | 2013-01-18 11:44:04 +1100 | [diff] [blame] | 1221 | Keys may be specified as a text file, listing one public key per line, or as |
| 1222 | an OpenSSH Key Revocation List (KRL) as generated by |
Damien Miller | 72abeb7 | 2013-01-20 22:33:44 +1100 | [diff] [blame] | 1223 | .Xr ssh-keygen 1 . |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 1224 | For more information on KRLs, see the KEY REVOCATION LISTS section in |
Damien Miller | f3747bf | 2013-01-18 11:44:04 +1100 | [diff] [blame] | 1225 | .Xr ssh-keygen 1 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1226 | .It Cm RhostsRSAAuthentication |
| 1227 | Specifies whether rhosts or /etc/hosts.equiv authentication together |
| 1228 | with successful RSA host authentication is allowed. |
| 1229 | The default is |
| 1230 | .Dq no . |
| 1231 | This option applies to protocol version 1 only. |
| 1232 | .It Cm RSAAuthentication |
| 1233 | Specifies whether pure RSA authentication is allowed. |
| 1234 | The default is |
| 1235 | .Dq yes . |
| 1236 | This option applies to protocol version 1 only. |
| 1237 | .It Cm ServerKeyBits |
| 1238 | Defines the number of bits in the ephemeral protocol version 1 server key. |
Darren Tucker | 7499b0c | 2008-07-02 22:35:43 +1000 | [diff] [blame] | 1239 | The minimum value is 512, and the default is 1024. |
Damien Miller | 7acefbb | 2014-07-18 14:11:24 +1000 | [diff] [blame] | 1240 | .It Cm StreamLocalBindMask |
| 1241 | Sets the octal file creation mode mask |
| 1242 | .Pq umask |
| 1243 | used when creating a Unix-domain socket file for local or remote |
| 1244 | port forwarding. |
| 1245 | This option is only used for port forwarding to a Unix-domain socket file. |
| 1246 | .Pp |
| 1247 | The default value is 0177, which creates a Unix-domain socket file that is |
| 1248 | readable and writable only by the owner. |
| 1249 | Note that not all operating systems honor the file mode on Unix-domain |
| 1250 | socket files. |
| 1251 | .It Cm StreamLocalBindUnlink |
| 1252 | Specifies whether to remove an existing Unix-domain socket file for local |
| 1253 | or remote port forwarding before creating a new one. |
| 1254 | If the socket file already exists and |
| 1255 | .Cm StreamLocalBindUnlink |
| 1256 | is not enabled, |
| 1257 | .Nm sshd |
| 1258 | will be unable to forward the port to the Unix-domain socket file. |
| 1259 | This option is only used for port forwarding to a Unix-domain socket file. |
| 1260 | .Pp |
| 1261 | The argument must be |
| 1262 | .Dq yes |
| 1263 | or |
| 1264 | .Dq no . |
| 1265 | The default is |
| 1266 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1267 | .It Cm StrictModes |
| 1268 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1269 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1270 | should check file modes and ownership of the |
| 1271 | user's files and home directory before accepting login. |
| 1272 | This is normally desirable because novices sometimes accidentally leave their |
| 1273 | directory or files world-writable. |
| 1274 | The default is |
| 1275 | .Dq yes . |
Darren Tucker | f788a91 | 2010-01-08 17:06:47 +1100 | [diff] [blame] | 1276 | Note that this does not apply to |
| 1277 | .Cm ChrootDirectory , |
| 1278 | whose permissions and ownership are checked unconditionally. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1279 | .It Cm Subsystem |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 1280 | Configures an external subsystem (e.g. file transfer daemon). |
Damien Miller | 917f9b6 | 2006-07-10 20:36:47 +1000 | [diff] [blame] | 1281 | Arguments should be a subsystem name and a command (with optional arguments) |
| 1282 | to execute upon subsystem request. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 1283 | .Pp |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1284 | The command |
| 1285 | .Xr sftp-server 8 |
| 1286 | implements the |
| 1287 | .Dq sftp |
| 1288 | file transfer subsystem. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 1289 | .Pp |
| 1290 | Alternately the name |
| 1291 | .Dq internal-sftp |
| 1292 | implements an in-process |
| 1293 | .Dq sftp |
| 1294 | server. |
| 1295 | This may simplify configurations using |
| 1296 | .Cm ChrootDirectory |
| 1297 | to force a different filesystem root on clients. |
| 1298 | .Pp |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1299 | By default no subsystems are defined. |
| 1300 | Note that this option applies to protocol version 2 only. |
| 1301 | .It Cm SyslogFacility |
| 1302 | Gives the facility code that is used when logging messages from |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1303 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1304 | The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, |
| 1305 | LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. |
| 1306 | The default is AUTH. |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 1307 | .It Cm TCPKeepAlive |
| 1308 | Specifies whether the system should send TCP keepalive messages to the |
| 1309 | other side. |
| 1310 | If they are sent, death of the connection or crash of one |
| 1311 | of the machines will be properly noticed. |
| 1312 | However, this means that |
| 1313 | connections will die if the route is down temporarily, and some people |
| 1314 | find it annoying. |
| 1315 | On the other hand, if TCP keepalives are not sent, |
| 1316 | sessions may hang indefinitely on the server, leaving |
| 1317 | .Dq ghost |
| 1318 | users and consuming server resources. |
| 1319 | .Pp |
| 1320 | The default is |
| 1321 | .Dq yes |
| 1322 | (to send TCP keepalive messages), and the server will notice |
| 1323 | if the network goes down or the client host crashes. |
| 1324 | This avoids infinitely hanging sessions. |
| 1325 | .Pp |
| 1326 | To disable TCP keepalive messages, the value should be set to |
| 1327 | .Dq no . |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1328 | .It Cm TrustedUserCAKeys |
| 1329 | Specifies a file containing public keys of certificate authorities that are |
Damien Miller | c6db99e | 2010-03-05 10:41:45 +1100 | [diff] [blame] | 1330 | trusted to sign user certificates for authentication. |
Damien Miller | 72b3382 | 2010-03-05 07:39:01 +1100 | [diff] [blame] | 1331 | Keys are listed one per line; empty lines and comments starting with |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1332 | .Ql # |
| 1333 | are allowed. |
| 1334 | If a certificate is presented for authentication and has its signing CA key |
| 1335 | listed in this file, then it may be used for authentication for any user |
| 1336 | listed in the certificate's principals list. |
| 1337 | Note that certificates that lack a list of principals will not be permitted |
| 1338 | for authentication using |
| 1339 | .Cm TrustedUserCAKeys . |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 1340 | For more details on certificates, see the CERTIFICATES section in |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1341 | .Xr ssh-keygen 1 . |
Damien Miller | 3a961dc | 2003-06-03 10:25:48 +1000 | [diff] [blame] | 1342 | .It Cm UseDNS |
| 1343 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1344 | .Xr sshd 8 |
Darren Tucker | 83d5a98 | 2005-03-31 21:33:50 +1000 | [diff] [blame] | 1345 | should look up the remote host name and check that |
Damien Miller | 3a961dc | 2003-06-03 10:25:48 +1000 | [diff] [blame] | 1346 | the resolved host name for the remote IP address maps back to the |
| 1347 | very same IP address. |
| 1348 | The default is |
| 1349 | .Dq yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1350 | .It Cm UseLogin |
| 1351 | Specifies whether |
| 1352 | .Xr login 1 |
| 1353 | is used for interactive login sessions. |
| 1354 | The default is |
| 1355 | .Dq no . |
| 1356 | Note that |
| 1357 | .Xr login 1 |
| 1358 | is never used for remote command execution. |
| 1359 | Note also, that if this is enabled, |
| 1360 | .Cm X11Forwarding |
| 1361 | will be disabled because |
| 1362 | .Xr login 1 |
| 1363 | does not know how to handle |
| 1364 | .Xr xauth 1 |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 1365 | cookies. |
| 1366 | If |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1367 | .Cm UsePrivilegeSeparation |
| 1368 | is specified, it will be disabled after authentication. |
Damien Miller | 2e193e2 | 2003-05-14 15:13:03 +1000 | [diff] [blame] | 1369 | .It Cm UsePAM |
Darren Tucker | 1dcff9a | 2004-05-13 16:51:40 +1000 | [diff] [blame] | 1370 | Enables the Pluggable Authentication Module interface. |
| 1371 | If set to |
| 1372 | .Dq yes |
| 1373 | this will enable PAM authentication using |
| 1374 | .Cm ChallengeResponseAuthentication |
Darren Tucker | a4904f7 | 2006-02-23 21:35:30 +1100 | [diff] [blame] | 1375 | and |
| 1376 | .Cm PasswordAuthentication |
| 1377 | in addition to PAM account and session module processing for all |
| 1378 | authentication types. |
Darren Tucker | 1dcff9a | 2004-05-13 16:51:40 +1000 | [diff] [blame] | 1379 | .Pp |
| 1380 | Because PAM challenge-response authentication usually serves an equivalent |
| 1381 | role to password authentication, you should disable either |
| 1382 | .Cm PasswordAuthentication |
| 1383 | or |
| 1384 | .Cm ChallengeResponseAuthentication. |
| 1385 | .Pp |
| 1386 | If |
| 1387 | .Cm UsePAM |
| 1388 | is enabled, you will not be able to run |
| 1389 | .Xr sshd 8 |
| 1390 | as a non-root user. |
| 1391 | The default is |
Darren Tucker | 6c0c070 | 2003-10-09 14:13:53 +1000 | [diff] [blame] | 1392 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1393 | .It Cm UsePrivilegeSeparation |
| 1394 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1395 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1396 | separates privileges by creating an unprivileged child process |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 1397 | to deal with incoming network traffic. |
| 1398 | After successful authentication, another process will be created that has |
| 1399 | the privilege of the authenticated user. |
| 1400 | The goal of privilege separation is to prevent privilege |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1401 | escalation by containing any corruption within the unprivileged processes. |
| 1402 | The default is |
| 1403 | .Dq yes . |
Damien Miller | 69ff1df | 2011-06-23 08:30:03 +1000 | [diff] [blame] | 1404 | If |
| 1405 | .Cm UsePrivilegeSeparation |
| 1406 | is set to |
| 1407 | .Dq sandbox |
| 1408 | then the pre-authentication unprivileged process is subject to additional |
| 1409 | restrictions. |
Damien Miller | 2352881 | 2012-04-22 11:24:43 +1000 | [diff] [blame] | 1410 | .It Cm VersionAddendum |
| 1411 | Optionally specifies additional text to append to the SSH protocol banner |
| 1412 | sent by the server upon connection. |
| 1413 | The default is |
| 1414 | .Dq none . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1415 | .It Cm X11DisplayOffset |
| 1416 | Specifies the first display number available for |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1417 | .Xr sshd 8 Ns 's |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1418 | X11 forwarding. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1419 | This prevents sshd from interfering with real X11 servers. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1420 | The default is 10. |
| 1421 | .It Cm X11Forwarding |
| 1422 | Specifies whether X11 forwarding is permitted. |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1423 | The argument must be |
| 1424 | .Dq yes |
| 1425 | or |
| 1426 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1427 | The default is |
| 1428 | .Dq no . |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1429 | .Pp |
| 1430 | When X11 forwarding is enabled, there may be additional exposure to |
| 1431 | the server and to client displays if the |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1432 | .Xr sshd 8 |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1433 | proxy display is configured to listen on the wildcard address (see |
| 1434 | .Cm X11UseLocalhost |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1435 | below), though this is not the default. |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1436 | Additionally, the authentication spoofing and authentication data |
| 1437 | verification and substitution occur on the client side. |
| 1438 | 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] | 1439 | display server may be exposed to attack when the SSH client requests |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1440 | forwarding (see the warnings for |
| 1441 | .Cm ForwardX11 |
| 1442 | in |
Damien Miller | f1ce505 | 2003-06-11 22:04:39 +1000 | [diff] [blame] | 1443 | .Xr ssh_config 5 ) . |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1444 | A system administrator may have a stance in which they want to |
| 1445 | protect clients that may expose themselves to attack by unwittingly |
| 1446 | requesting X11 forwarding, which can warrant a |
| 1447 | .Dq no |
| 1448 | setting. |
| 1449 | .Pp |
| 1450 | Note that disabling X11 forwarding does not prevent users from |
| 1451 | forwarding X11 traffic, as users can always install their own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1452 | X11 forwarding is automatically disabled if |
| 1453 | .Cm UseLogin |
| 1454 | is enabled. |
| 1455 | .It Cm X11UseLocalhost |
| 1456 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1457 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1458 | should bind the X11 forwarding server to the loopback address or to |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 1459 | the wildcard address. |
| 1460 | By default, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1461 | sshd binds the forwarding server to the loopback address and sets the |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1462 | hostname part of the |
| 1463 | .Ev DISPLAY |
| 1464 | environment variable to |
| 1465 | .Dq localhost . |
Ben Lindstrom | 15b6120 | 2002-08-20 18:44:24 +0000 | [diff] [blame] | 1466 | This prevents remote hosts from connecting to the proxy display. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1467 | However, some older X11 clients may not function with this |
| 1468 | configuration. |
| 1469 | .Cm X11UseLocalhost |
| 1470 | may be set to |
| 1471 | .Dq no |
| 1472 | to specify that the forwarding server should be bound to the wildcard |
| 1473 | address. |
| 1474 | The argument must be |
| 1475 | .Dq yes |
| 1476 | or |
| 1477 | .Dq no . |
| 1478 | The default is |
| 1479 | .Dq yes . |
| 1480 | .It Cm XAuthLocation |
Damien Miller | 05913ba | 2002-09-04 16:51:03 +1000 | [diff] [blame] | 1481 | Specifies the full pathname of the |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1482 | .Xr xauth 1 |
| 1483 | program. |
| 1484 | The default is |
| 1485 | .Pa /usr/X11R6/bin/xauth . |
| 1486 | .El |
Damien Miller | e3beba2 | 2006-03-15 11:59:25 +1100 | [diff] [blame] | 1487 | .Sh TIME FORMATS |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1488 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1489 | command-line arguments and configuration file options that specify time |
| 1490 | may be expressed using a sequence of the form: |
| 1491 | .Sm off |
Ben Lindstrom | 1f8cf4f | 2002-08-20 18:43:27 +0000 | [diff] [blame] | 1492 | .Ar time Op Ar qualifier , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1493 | .Sm on |
| 1494 | where |
| 1495 | .Ar time |
| 1496 | is a positive integer value and |
| 1497 | .Ar qualifier |
| 1498 | is one of the following: |
| 1499 | .Pp |
| 1500 | .Bl -tag -width Ds -compact -offset indent |
Damien Miller | 393821a | 2006-07-24 14:04:53 +1000 | [diff] [blame] | 1501 | .It Aq Cm none |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1502 | seconds |
| 1503 | .It Cm s | Cm S |
| 1504 | seconds |
| 1505 | .It Cm m | Cm M |
| 1506 | minutes |
| 1507 | .It Cm h | Cm H |
| 1508 | hours |
| 1509 | .It Cm d | Cm D |
| 1510 | days |
| 1511 | .It Cm w | Cm W |
| 1512 | weeks |
| 1513 | .El |
| 1514 | .Pp |
| 1515 | Each member of the sequence is added together to calculate |
| 1516 | the total time value. |
| 1517 | .Pp |
| 1518 | Time format examples: |
| 1519 | .Pp |
| 1520 | .Bl -tag -width Ds -compact -offset indent |
| 1521 | .It 600 |
| 1522 | 600 seconds (10 minutes) |
| 1523 | .It 10m |
| 1524 | 10 minutes |
| 1525 | .It 1h30m |
| 1526 | 1 hour 30 minutes (90 minutes) |
| 1527 | .El |
| 1528 | .Sh FILES |
| 1529 | .Bl -tag -width Ds |
| 1530 | .It Pa /etc/ssh/sshd_config |
| 1531 | Contains configuration data for |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1532 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1533 | This file should be writable by root only, but it is recommended |
| 1534 | (though not necessary) that it be world-readable. |
| 1535 | .El |
Damien Miller | f1ce505 | 2003-06-11 22:04:39 +1000 | [diff] [blame] | 1536 | .Sh SEE ALSO |
| 1537 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1538 | .Sh AUTHORS |
| 1539 | OpenSSH is a derivative of the original and free |
| 1540 | ssh 1.2.12 release by Tatu Ylonen. |
| 1541 | Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, |
| 1542 | Theo de Raadt and Dug Song |
| 1543 | removed many bugs, re-added newer features and |
| 1544 | created OpenSSH. |
| 1545 | Markus Friedl contributed the support for SSH |
| 1546 | protocol versions 1.5 and 2.0. |
| 1547 | Niels Provos and Markus Friedl contributed support |
| 1548 | for privilege separation. |