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