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