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