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